From fd0ee8ae7ba658f77f99f94477b431f2c40fe242 Mon Sep 17 00:00:00 2001 From: Jonah Date: Sun, 30 Jul 2023 17:37:40 -0500 Subject: [PATCH] LibWeb: Escape quotes in style sheet sources Some rules in style sheets contain quotes, escaping them allows us to generate code that actually compiles for them. --- Userland/Libraries/LibWeb/Scripts/GenerateStyleSheetSource.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Scripts/GenerateStyleSheetSource.sh b/Userland/Libraries/LibWeb/Scripts/GenerateStyleSheetSource.sh index 35b8e906f6..24e14083f9 100755 --- a/Userland/Libraries/LibWeb/Scripts/GenerateStyleSheetSource.sh +++ b/Userland/Libraries/LibWeb/Scripts/GenerateStyleSheetSource.sh @@ -5,7 +5,7 @@ echo "namespace Web::CSS {" echo "extern StringView $1;" echo "StringView $1 = \"\\" grep -v '^ *#' < "$2" | while IFS= read -r line; do - echo "$line""\\" + echo "$line""\\" | sed 's/"/\\\"/g' done echo "\"sv;" echo "}"