Skip to content

Commit

Permalink
Add <div xmlns to generated html text (#2504)
Browse files Browse the repository at this point in the history
add div around generated elements
  • Loading branch information
nickbristow authored Sep 6, 2024
1 parent a40959b commit 399e001
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@
{
"status":"generated",
{% if component.section.text -%}
"div": "{{ component.section.text | to_html_string }}",
{% assign componentDiv = component.section.text | to_html_string %}
{% if componentDiv contains "http://www.w3.org/1999/xhtml" %}
"div": "{{ componentDiv }}",
{% else -%}
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">{{ componentDiv }}</div>",
{% endif -%}
{% elsif component.section.title._ -%}
"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">{{ component.section.title._ | escape }}</div>",
{% else -%}
Expand Down

0 comments on commit 399e001

Please sign in to comment.