Version: (using KDE 4.2.4) OS: Linux Installed from: Ubuntu Packages Testcase from Gabriele Romanato: --------- http://test.csswg.org/source/CSS2.1-test-suite/incoming/gabriele/basic/sec4/blocks0.html Relevant code involved: ----------------------- <style type="text/css"> p {color: green} p {color: red '\'} </style> <p>This text should be green, not red.</p> In CSS 2.1, '\'' is an escaped single quote, is a string consisting of a single quote. On the other hand, '\' is an unclosed string. "Unexpected end of string. User agents must close strings upon reaching the end of a line, but then drop the construct (declaration or rule) in which the string was found." http://www.w3.org/TR/CSS21/syndata.html#parsing-errors regards, Gérard
*** Bug 198103 has been marked as a duplicate of this bug. ***
*** Bug 198099 has been marked as a duplicate of this bug. ***
Original testcase from Gabriele Romanato is now at: http://test.csswg.org/source/contributors/gabriele/incoming/basic/sec4/blocks0.html regards, Gérard
Relevant excerpts of spec: " A block starts with a left curly brace ({) and ends with the matching right curly brace (}). In between there may be any tokens, except that parentheses (( )), brackets ([ ]), and braces ({ }) must always occur in matching pairs and may be nested. Single (') and double quotes (") must also occur in matching pairs, and characters between them are parsed as a string. " CSS 2.1, section 4.1.6 Blocks http://www.w3.org/TR/CSS21/syndata.html#block " In CSS 2.1, a backslash (\) character can indicate one of three types of character escape. (...) Second, it cancels the meaning of special CSS characters. Any character (except a hexadecimal digit, linefeed, carriage return, or form feed) can be escaped with a backslash to remove its special meaning. For example, "\"" is a string consisting of one double quote. " CSS 2.1, section 4.1.3 Characters and case http://www.w3.org/TR/CSS21/syndata.html#characters ----------------- Updating URL field. Gérard
Temporary link to test: http://test.csswg.org/source/work-in-progress/gabriele/basic/sec4/blocks0.html *_Permanent_* link to test: http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/Bug198096-parsing-unclosed-string.html Nota bene: If there is one single blank white space between the carriage return and </style>, then parsing is correct and the sentence is green. Gérard
Dear user, KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6. Please migrate to use a QWebEngine based HTML component. We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes. For security issues, please see: https://kde.org/info/security/ Sorry that we did not fix this issue during the life-time of KHTML. Greetings Christoph Cullmann