Closed sarken closed 5 years ago
We tested a more recent version of the gem and that fixed the issue, so I will close this! Apologies for the invalid report and not checking the obvious solution first.
No worries. Glad to hear the newer version solved your problem!
When using the
<track>
and<source>
elements inside an<audio>
or<video>
element, closing</track>
and</source>
tags are automatically added.Example input:
Example output:
However, if you run the resultant code through the W3 Validator, it gives a "Stray end tags" error about
</track>
and</source>
.So the desired output would be:
We're on Ruby 2.6.5 and Sanitize version 4.6.5, and our audio and video tag sanitizer is here in case you need to look at our implementation. Running the HTML through nokogiri does not add the closing tags.