tgalopin / html-sanitizer

Sanitize untrustworthy HTML user input
MIT License
390 stars 41 forks source link

<u> tag not supported #64

Closed adriflorence closed 2 years ago

adriflorence commented 3 years ago

Hi, I am using html/sanitizer version 1.4.0 in a Symfony project, and the Sanitizer filters out the <u> tags even though it is explicitly configured in the tags section as in the configuration reference file.

      $sanitizer = Sanitizer::create([
          'extensions' => ['basic', 'code', 'image', 'list', 'table', 'details', 'extra'],
          'tags' => [
              'u' => [
                  'allowed_attributes' => [],
              ],
          ],
      ]);

I noticed there was a PR (#61) for adding <u> tags into the basic extension but it's not been released yet. Are tags only available from within extensions? So until that commit is released there will be no support for <u> tags? Could someone please advise?

Thanks a lot!

huynguyen93 commented 3 years ago

I have the same issue

fbastien commented 3 years ago

@adriflorence Indeed support for <u> tag (and documentation mentioning it) was merged in the repository but not released yet. In order to handle <u> tags you have to either wait for next version to be released, or create your own extension in your project in the meantime.

tgalopin commented 2 years ago

It is now!