JiHong88 / suneditor

Pure javascript based WYSIWYG html editor, with no dependencies.
http://suneditor.com
MIT License
1.66k stars 307 forks source link

lang attr stripped even when allowed with attributesWhitelist #1380

Closed JanValkenburg closed 2 months ago

JanValkenburg commented 2 months ago

Describe the bug I have whitelisted the 'lang' attribute using the attributesWhitelist, but the attribute is still being removed.

in: < p lang="JA">x< /p>

out: < p>x< /p>

code: attributesWhitelist: { 'all': 'lang' },

Expected behavior Keep the lang attribute in the code

JiHong88 commented 2 months ago

This issue is not reproduced. Please try the latest version or provide a more detailed test environment.

JanValkenburg commented 2 months ago

It works at the moment, nothing changes. Was always using the latest version from the url below. https://cdn.jsdelivr.net/npm/suneditor@latest/dist/suneditor.min.js