Skip to content

Commit 7cd21c5

Browse files
committed
Extend CssParser quote support
Updates the CssParser.ParseBackgroundImageProperty method to correctly support values surrounded with double quotes.
1 parent ae5f732 commit 7cd21c5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Source/HtmlRenderer/Parse/CssParser.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,9 @@ private static string ParseBackgroundImageProperty(string propValue)
553553
if(endIdx > -1)
554554
{
555555
endIdx -= 1;
556-
while (startIdx < endIdx && (char.IsWhiteSpace(propValue[startIdx]) || propValue[startIdx] == '\''))
556+
while (startIdx < endIdx && (char.IsWhiteSpace(propValue[startIdx]) || propValue[startIdx] == '\'' || propValue[startIdx] == '"'))
557557
startIdx++;
558-
while (startIdx < endIdx && (char.IsWhiteSpace(propValue[endIdx]) || propValue[endIdx] == '\''))
558+
while (startIdx < endIdx && (char.IsWhiteSpace(propValue[endIdx]) || propValue[endIdx] == '\'' || propValue[endIdx] == '"'))
559559
endIdx--;
560560

561561
if (startIdx <= endIdx)

0 commit comments

Comments
 (0)