Topic: Requiring an attribute be added and reset to value even if missing
Hello!
I was trying to make HTMLawed add to every IFRAME tag it finds the sandbox attribute with a specific fixed value.
For example, no matter if the sandbox attribute is present or with what value, it always should output something like:
<iframe sandbox="allow-scripts" ...>
Is it possible to achieve this with HTMLawed?
My Config:
'comment' => 1,
'safe' => 1,
'cdata' => 1,
'remove_void_tags' => true,
'elements' => '*-script-style+iframe+object+embed',
My $spec param:
'iframe=sandbox(default="allow-scripts")'
But it works ONLY if sandbox attribute is already present!