Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: How to get raw node content

by huck (Vicar)
on Sep 15, 2017 at 19:53 UTC ( #1199477=note: print w/replies, xml ) Need Help??

in reply to How to get raw node content

When i want to do that i just use the "view page source" option in my browser. If that is still too much you may want to try adding displaytype=print ie and then "view page source"

Replies are listed 'Best First'.
Re^2: How to get raw node content (whitespace and nodelet hack)
by LanX (Bishop) on Sep 16, 2017 at 15:06 UTC
    Actually your approach is better to see whitespaces and linebreaks directly inside the browser, since the XML view in FF doesn't show it.

    FWIW here a nodelet hack which opens a JS.alert() with the HTML of the post you are trying to reply to.

    <script><!-- function show_quote() { alert(document.querySelector("div.preview").innerHTML.match(/^[^]*?(?= +<hr> <div class="editnodetext">)/)[0]); } --></script> <a href='javascript:show_quote()'> show_quote</a>

    (you need to be in a "comment on" node to make it work)

    it was part of my plans to extend my wiki-syntax with comfortable quoting of a users post...

    ... of course milking the XML-displaytype would be more reasonable here.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Re^2: How to get raw node content
by LanX (Bishop) on Sep 15, 2017 at 20:44 UTC
    Sorry for nitpicking ...

    ... it's very close but that's not the raw input of the poster.

    For instance [links] are expanded and code tags have an extra download link.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Re^2: How to get raw node content
by roboticus (Chancellor) on Sep 15, 2017 at 21:02 UTC


    Thanks, but that still has the HTML entities encoding and bracket ([ ]) munging.


    When your only tool is a hammer, all problems look like your thumb.

      How raw can we get?

      lynx -dump > dump.txt


      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

      perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

        I think you are missing the point, compare the data inside the xml link with the produced html.

        For instance you can see find* the original line breaks and indentation in the raw form if a poster forgets surrounding code tags

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!

        *) The xml view inside FF doesn't display the (included) line-breaks, but if one's copy the content to an editor it becomes visible again.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1199477]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-03-20 00:27 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (247 votes). Check out past polls.