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:
nisheeth 1998-07-07 05:57:50 +00:00
Родитель ca5a505826
Коммит 9b35fbe8c1
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -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 &&