Get the free theme
View Categories

Scripts, Styles, and the unfiltered_html Capability

3 min read

Canvas passes your markup through as written, including style and script. Whether WordPress keeps that markup depends on the editing account, not on Canvas.

WordPress only stores raw script and style for accounts that have the unfiltered_html capability. On a standard single-site install, administrators have it, so their scripts and styles are kept. Accounts without the capability have script and style stripped on save, which is the normal WordPress rule for those roles.

If your markup is coming back with its script or style removed, the account you’re editing with most likely lacks unfiltered_html. The settings screen states this plainly so you know what to expect. The troubleshooting article on stripped markup walks through how to confirm it.

<lc-toy:the-cascade>
p { color: ink-mid } .note { color: sage-deep } #lead { color: sage-bright } style=”…” color: copper
The 8:14 p wins. specificity 0,0,0,1 .note wins. specificity 0,0,1,0 #lead wins. specificity 0,1,0,0 inline wins. specificity 1,0,0,0