ClosestStorm / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

prettyPrintOne doesn't work with HTML #349

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

console.log(prettyPrintOne("<div>"));

What is the expected output?  What do you see instead?
pretty printed <div> but instead it just returns an unescaped <div>

What version are you using?  On what browser?
Chrome 36

Original issue reported on code.google.com by ort...@google.com on 26 Aug 2014 at 1:15

GoogleCodeExporter commented 9 years ago
prettyPrintOne takes input as HTML and preserves formatting tags in the input.  
If you have plain text that you want to pretty print, escape HTML special 
characters using HTML entities before passing it in.  The minimal set of 
characters you need to escape is [<&].

Original comment by mikesamuel@gmail.com on 26 Aug 2014 at 5:20

GoogleCodeExporter commented 9 years ago
Issue 350 has been merged into this issue.

Original comment by mikesamuel@gmail.com on 1 Sep 2014 at 7:55