Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faulty XML encoding of characters in <script> tags in <head> #60

Open
GoogleCodeExporter opened this issue Jul 24, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Run html with <script> tags in the <head> that contain characters like 
ampersands

What is the expected output? What do you see instead?

I would expect the scripts to survive verbatim


What version of the product are you using? On what operating system?

1.2.0


Please provide any additional information below.

As a workaround I changed:

//html.append(xmlEncode(String.valueOf(ch, start, length)));
html.append((String.valueOf(ch, start, length)));

in HTMLHighlighter.java


NOTE: I also changed the TAG_ACTIONS map to be empty, since our goal is to get 
a as verbatim as possible copy of the original HTML document with just small 
markers (class) on marked elements.. Short of emptying that map I could not 
figure out how to get the original <head> out of the document.

Original issue reported on code.google.com by [email protected] on 14 Jan 2013 at 1:20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant