85Views6Replies

Author Options:

Is there a javascript command or some code or something that would enable me to see "invisible" code in the page source? Answered

I was looking at the source page of some of my instructables and was not able to see the <script> I had put into the source box. I need to be able to see it for a coding project of mine and without any outside resources (software, etc.). I wan't to be able to see that code in the source page of the site by using some javascript command or something like that. Any ideas or javascript knowledge?

Discussions

0
None
Libahunt

6 years ago

If you mean you want to show a javascript code example to the readers then you should try using html entity markings instead of less-than and greater-than signs. If I remember correct "Source" edit is available only for pro members, so I'm not sure how the usual editor treats this unicode markup. But try it out.
Reference: http://www.html-entities.org/

(I'll test some things out in here and tell the results in a comment

< &lt; &amp;lt;
> &gt; &amp;gt;
<script></script>
)


If you mean you want to insert a working javascript then that is impossible for security reasons. The content you submit is filtered according to this websites rules what they allow and what they don't, javascript isn't allowed. There is no software that could show that part anyway, because it is filtered out, it never made it into the page source code. That filtering is why some content you inserted might have disappeared.

0
None
Eric_HillLibahunt

Answer 6 years ago

so is there a way to unfilter those parts so I can see the script I inserted into the 'ible in the page source?

0
None
LibahuntEric_Hill

Answer 6 years ago

If it got filtered out by the sites software, then it simply is not there. It probably was deleted even before your 'ible was saved in a database on the server.

0
None
LibahuntLibahunt

Answer 6 years ago

Everything I typed in a rich editor text box appeared in that comment.

Could you describe specifically what was the part that does not show up for you?


One more test:
< < &lt;
> > &gt;

0
None
Eric_HillLibahunt

Answer 6 years ago

I had and I was trying to see it in the page source but it dissappears from the page source.

0
None
LibahuntLibahunt

Answer 6 years ago

Aha, simple editor (used only for comments?) does delete script tags and convert html entities into their respective symbols. I inserted exactly the same things into the second test that were displayed unchanged in my first post. Compare them to see what happens.