xsltProcessor returns html instead of text
Reported by
brand.pe...@gmail.com,
Dec 18 2017
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36 Steps to reproduce the problem: Open the attached HTML page What is the expected behavior? One should see an alert with the message "Hello World" What went wrong? The XSLTProcessor fails to obey the XSL:output directive specifying text output, and returns an HTML document instead, with the text wrapped in a PRE tag. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 63.0.3239.84 Channel: n/a OS Version: 10.0 Flash Version: https://developer.mozilla.org/en-US/docs/Web/API/XSLTProcessor The resultant object depends on the output method of the stylesheet: Output method Result type html HTMLDocument xml XMLDocument text XMLDocument with a single root element <transformiix:result> with the text as a child
,
Dec 26 2017
Able to reproduce this issue on Mac 10.12.6, Win-10 and Ubuntu 14.04 using chrome reported version #63.0.3239.84 and latest canary #65.0.3303.0. This is a non-regression issue as it is observed from M50 old builds. Hence, marking it as untriaged to get more inputs from dev team. Thanks...!!
,
Apr 12 2018
,
Apr 15 2018
I just ran into this issues on Windows 10 Chrome. I was transforming an SRGS grammar document using the W3C stylesheet at https://www.w3.org/TR/speech-grammar/grammar-transformer.xsl which has xsl:output method="text" On Firefox, the transform result was the expected transformiix:result document. The transformed text result is obtained with doc.documentElement.textContent On Chrome, it was an unexpected HTML document. The transformed text result is obtained with doc.getElementsByTagName("pre")[0].textContent For XSLTProcessor documentation, see https://developer.mozilla.org/en-US/docs/Web/API/XSLTProcessor which says there is no standard! |
|||
►
Sign in to add a comment |
|||
Comment 1 by krajshree@chromium.org
, Dec 18 2017