What HTML elements are allowed in Open Data Text Blocks?

1062
1
Jump to solution
03-14-2017 01:04 PM
KenDoman
Occasional Contributor II

First off, thank you for the updates to the Open Data sites, and the Deep Customization content. Keep up the good work.

I was trying to create some custom content using the text panel. Part of the content included some SVG images. When I saved the site and viewed the data, the SVGs were stripped out. When I edited the section again, the raw SVG content was still inside the configuration text area, but the SVG was missing from the row when I finished editing the content.

For one of the SVG images, I used an SVG containing an internal style sheet. When I viewed the HTML code for the output page, the svg, g, and path elements were removed. However, the internal style sheet was present in the output HTML code.

Is there a list of approved/unapproved HTML elements that can be used in the Open Data text blocks? Are SVGs specifically prohibited, and will using an img element with an SVG source be an acceptable substitute?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
CourtneyClaessens
Occasional Contributor III

Hi Ken, 

You're right, we don't allow svg element. You can use an svg source with an img element.

The following HTML elements are allowed: 

 'a', 'b', 'blockquote', 'br', 'caption', 'cite', 'code', 'col',
 'colgroup', 'dd', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'small', 'strike', 'strong',
 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'u',
 'ul', 'center', 'style', 'div', 'span'


And the following attributes for those elements are allowed: 

 '__ALL__' : ['class', 'style'],
 'a' : ['href', 'title'],
 'blockquote': ['cite'],
 'col' : ['span', 'width'],
 'colgroup' : ['span', 'width'],
 'img' : ['align', 'alt', 'height', 'src', 'title', 'width' ],
 'ol' : ['start', 'type'],
 'q' : ['cite'],
 'table' : ['summary', 'width', 'class'],
 'td' : ['abbr', 'axis', 'colspan', 'rowspan', 'width'],
 'th' : ['abbr', 'axis', 'colspan', 'rowspan', 'scope', 'width'],
 'ul' : ['type']



View solution in original post

0 Kudos
1 Reply
CourtneyClaessens
Occasional Contributor III

Hi Ken, 

You're right, we don't allow svg element. You can use an svg source with an img element.

The following HTML elements are allowed: 

 'a', 'b', 'blockquote', 'br', 'caption', 'cite', 'code', 'col',
 'colgroup', 'dd', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
 'i', 'img', 'li', 'ol', 'p', 'pre', 'q', 'small', 'strike', 'strong',
 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'u',
 'ul', 'center', 'style', 'div', 'span'


And the following attributes for those elements are allowed: 

 '__ALL__' : ['class', 'style'],
 'a' : ['href', 'title'],
 'blockquote': ['cite'],
 'col' : ['span', 'width'],
 'colgroup' : ['span', 'width'],
 'img' : ['align', 'alt', 'height', 'src', 'title', 'width' ],
 'ol' : ['start', 'type'],
 'q' : ['cite'],
 'table' : ['summary', 'width', 'class'],
 'td' : ['abbr', 'axis', 'colspan', 'rowspan', 'width'],
 'th' : ['abbr', 'axis', 'colspan', 'rowspan', 'scope', 'width'],
 'ul' : ['type']



0 Kudos