зеркало из https://github.com/mozilla/pjs.git
Fix for bug 232611 which was a duplicate of bug 120234 which got fixed in 4.06.
Fix was reviewed by rjc and dp when it went into the 4.06 branch. Fixed the case where an unclosed single quote in a tag causes the STYLE attribute to not be found. This was causing an infinite loop where layout would process the style attribute repeatedly. See bug report for details. Affected code is inside lo_ProcessStyleAttribute().
This commit is contained in:
Родитель
ca5a505826
Коммит
9b35fbe8c1
|
@ -665,10 +665,14 @@ lo_ProcessStyleAttribute(MWContext *context, lo_DocState *state, PA_Tag *tag, ch
|
|||
*/
|
||||
for (ptr=(char*)tag->data, end = ptr+tag->data_len; ptr < end; ptr++) {
|
||||
if (*ptr == '"') {
|
||||
in_double_quote = !in_double_quote;
|
||||
/* Fix for bug #120234. Ignore double quotes while inside single quoted attribute. */
|
||||
if (!in_single_quote)
|
||||
in_double_quote = !in_double_quote;
|
||||
}
|
||||
else if (*ptr == '\'') {
|
||||
in_single_quote = !in_single_quote;
|
||||
/* Fix for bug #120234. Ignore single quotes while inside double quoted attribute. */
|
||||
if (!in_double_quote)
|
||||
in_single_quote = !in_single_quote;
|
||||
}
|
||||
else if (!in_single_quote &&
|
||||
!in_double_quote &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче