Loading editor/src/htmlimport.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -1441,8 +1441,15 @@ void blogi::htmlimport::htmlElementToWidgetXml( } w->SetText(innerHtml.c_str()); if (cssProps.count("font-family")) w->SetAttribute("font_family", cssProps["font-family"].c_str()); if (cssProps.count("font-family")) { // Quoted font names (e.g. "Times New Roman") come through verbatim // from the parsed CSS -- re-emit with single quotes, since this // value ends up in a style="..." attribute later, and // libhtmlpp::HtmlElement::setAttribute throws on any literal '"'. std::string ff = cssProps["font-family"]; for (auto &c : ff) if (c == '"') c = '\''; w->SetAttribute("font_family", ff.c_str()); } if (cssProps.count("font-size")) w->SetAttribute("font_size", cssProps["font-size"].c_str()); if (cssProps.count("color")) Loading editor/widgets/list/list.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -628,7 +628,14 @@ extern "C" { } else { if (!gap.empty()) style += "display: flex; flex-direction: column; gap: " + gap + ";"; } if (!fontFamily.empty()) style += " font-family: " + fontFamily + ";"; if (!fontFamily.empty()) { // font-family values commonly carry quoted names (e.g. "Times New // Roman") -- libhtmlpp::HtmlElement::setAttribute throws on any // literal '"' in an attribute value, so re-emit with single quotes. std::string ff = fontFamily; for (auto &c : ff) if (c == '"') c = '\''; style += " font-family: " + ff + ";"; } if (!fontSize.empty()) style += " font-size: " + fontSize + ";"; if (!fontColor.empty()) style += " color: " + fontColor + ";"; if (!lineHeight.empty()) style += " line-height: " + lineHeight + ";"; Loading editor/widgets/textbox/textbox.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -924,7 +924,14 @@ extern "C" { } if (!width.empty()) style += " width: " + width + ";"; if (!height.empty()) style += " height: " + height + ";"; if (!fontFamily.empty()) style += " font-family: " + fontFamily + ";"; if (!fontFamily.empty()) { // font-family values commonly carry quoted names (e.g. "Times New // Roman") -- libhtmlpp::HtmlElement::setAttribute throws on any // literal '"' in an attribute value, so re-emit with single quotes. std::string ff = fontFamily; for (auto &c : ff) if (c == '"') c = '\''; style += " font-family: " + ff + ";"; } if (!fontSize.empty()) style += " font-size: " + fontSize + ";"; if (!fontColor.empty()) style += " color: " + fontColor + ";"; if (!textAlign.empty()) style += " text-align: " + textAlign + ";"; Loading Loading
editor/src/htmlimport.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -1441,8 +1441,15 @@ void blogi::htmlimport::htmlElementToWidgetXml( } w->SetText(innerHtml.c_str()); if (cssProps.count("font-family")) w->SetAttribute("font_family", cssProps["font-family"].c_str()); if (cssProps.count("font-family")) { // Quoted font names (e.g. "Times New Roman") come through verbatim // from the parsed CSS -- re-emit with single quotes, since this // value ends up in a style="..." attribute later, and // libhtmlpp::HtmlElement::setAttribute throws on any literal '"'. std::string ff = cssProps["font-family"]; for (auto &c : ff) if (c == '"') c = '\''; w->SetAttribute("font_family", ff.c_str()); } if (cssProps.count("font-size")) w->SetAttribute("font_size", cssProps["font-size"].c_str()); if (cssProps.count("color")) Loading
editor/widgets/list/list.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -628,7 +628,14 @@ extern "C" { } else { if (!gap.empty()) style += "display: flex; flex-direction: column; gap: " + gap + ";"; } if (!fontFamily.empty()) style += " font-family: " + fontFamily + ";"; if (!fontFamily.empty()) { // font-family values commonly carry quoted names (e.g. "Times New // Roman") -- libhtmlpp::HtmlElement::setAttribute throws on any // literal '"' in an attribute value, so re-emit with single quotes. std::string ff = fontFamily; for (auto &c : ff) if (c == '"') c = '\''; style += " font-family: " + ff + ";"; } if (!fontSize.empty()) style += " font-size: " + fontSize + ";"; if (!fontColor.empty()) style += " color: " + fontColor + ";"; if (!lineHeight.empty()) style += " line-height: " + lineHeight + ";"; Loading
editor/widgets/textbox/textbox.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -924,7 +924,14 @@ extern "C" { } if (!width.empty()) style += " width: " + width + ";"; if (!height.empty()) style += " height: " + height + ";"; if (!fontFamily.empty()) style += " font-family: " + fontFamily + ";"; if (!fontFamily.empty()) { // font-family values commonly carry quoted names (e.g. "Times New // Roman") -- libhtmlpp::HtmlElement::setAttribute throws on any // literal '"' in an attribute value, so re-emit with single quotes. std::string ff = fontFamily; for (auto &c : ff) if (c == '"') c = '\''; style += " font-family: " + ff + ";"; } if (!fontSize.empty()) style += " font-size: " + fontSize + ";"; if (!fontColor.empty()) style += " color: " + fontColor + ";"; if (!textAlign.empty()) style += " text-align: " + textAlign + ";"; Loading