Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2011-02

Possible bug in fcl-xml

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Leonardo M. Ramé

Hi, I need to parse a web page that contains some complex scripting, and I'm getting this an EDOMError in DOMDocument.CreateElement.

Inspecting the tagName param from TDOMDocument.CreateElement(const tagName: DOMString), I found the parser can't understand this line:

document.write('<scr'+'ipt type="text/javascript" src="' + dtmtag + '"></scr'+'ipt>');

I attached the problematic document for you to test it. It looks like a bug in sax_html.pp.

Now, is there a way to tell the parser to ignore some tags?, for example, here I would like to ignore the tag "<script>...</script>".

Thanks in advance.

Leonardo M. Ramé
http://leonardorame.blogspot.com

Reply by email

Unknown author
to Leonardo M. Ramé
Leonardo M. Ramé wrote 9 lines
Hi, I need to parse a web page that contains some complex scripting, and I'm getting this an EDOMError in DOMDocument.CreateElement. Inspecting the tagName param from TDOMDocument.CreateElement(const tagName: DOMString), I found the parser can't understand this line: document.write('<scr'+'ipt type="text/javascript" src="' + dtmtag + '"></scr'+'ipt>'); I attached the problematic document for you to test it. It looks like a bug in sax_html.pp. Now, is there a way to tell the parser to ignore some tags?, for example, here I would like to ignore the tag "<script>...</script>".

I have no knowledge of such a way, and I doubt it would help you, since it seems like this is a bug in the THTMLReader. Please file a bug report, with the attached HTML file to test on.

Michael.

Reply by email