Bug 125245 - Does not render CDATA in XHTML/XML elements correctly.
Summary: Does not render CDATA in XHTML/XML elements correctly.
Status: RESOLVED DUPLICATE of bug 52665
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-09 20:57 UTC by Matt Sicker
Modified: 2006-04-09 21:03 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Sicker 2006-04-09 20:57:20 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Example XHTML (served using application/xhtml+xml, although the problem most likely exists with any [X]HTML MIME type):

<a href='somelink.xhtml'><![CDATA[Some text that might like to use <text like this> & whatnot]]></a>

Following the rules of XML (and thusly XHTML), a user agent should use the text within the <![CDATA[]]> block as literal text.  A common use for this is inside a <style> and <script> element when writing out internal stylesheets or scripts so that characters like <, >, and & (commonly used in scripts and some CSS) are treated the way they should be.

Another example:

<textarea><![CDATA[]]></textarea>

This should render as an empty textarea, but "<![CDATA[]]>" is shown inside the textarea as literal, escaped text.  A use for this would be after previewing a form, the original content can remain inside the <![CDATA[]]> unaltered (including any preceding whitespace without chopping it off as XML whitespace).

Overall, KHTML is not even really considering what <![CDATA[]]> technically means and how it should be treated.  My guess is that KHTML is not [properly?] using an XML parser on application/xhtml+xml documents (as noticed by bug 52665), but I haven't looked into the actual source code in question.
Comment 1 Maksim Orlovich 2006-04-09 21:03:40 UTC
That would be correct.

*** This bug has been marked as a duplicate of 52665 ***