ezyang / htmlpurifier

Standards compliant HTML filter written in PHP
http://htmlpurifier.org
GNU Lesser General Public License v2.1
3.07k stars 327 forks source link

Config Core.AllowHostnameUnderscore work incorrectly #405

Closed lenhatthanh20 closed 5 months ago

lenhatthanh20 commented 5 months ago

Hello,

Im try to using the config Core.AllowHostnameUnderscore to allow underscore (_) in the hostname. Ref: http://htmlpurifier.org/live/configdoc/plain.html#Core.AllowHostnameUnderscore But it works incorrectly in some cases.

For example:

Do you have any alternative solution for this issue?

Thank you.

ezyang commented 5 months ago

Probably need to adjust the regex to allow underscore in more positions