Welcome! » Log In » Create A New Profile

link (a href) is removed when contain _

Posted by Lza 
Lza
link (a href) is removed when contain _
November 17, 2014 08:31AM

Hello,

I have text like that:

<a href="example_example.domain.com">some text</a>

and after htmlpurifier I get:

<a href="">some text</a>

After some investigation, I find put that when url contain _ then whole url is removed. Can I set something in coinfig to allow link contains char _ ?

Re: link (a href) is removed when contain _
November 17, 2014 11:29PM

Two things: 1. the link you've written is missing http:// so it wouldn't point to the real website anyway and it certainly should not have been filtered in the way you suggest, 2. underscore isn't a valid character in URL domains which is why it's been filtered out. There isn't (currently) a way to disable this behavior.

Billy
Re: link (a href) is removed when contain _
January 28, 2018 11:45PM

Any update on this, local subdomains can technically contain underscores.

Author:
Your Email:

Subject:

HTML input is enabled. Make sure you escape all HTML and angled brackets with &lt; and &gt;.

Auto-paragraphing is enabled. Double newlines will be converted to paragraphs; for single newlines, use the pre tag.

Allowed tags: a, abbr, acronym, b, blockquote, caption, cite, code, dd, del, dfn, div, dl, dt, em, i, ins, kbd, li, ol, p, pre, s, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var.

For inputting literal code such as HTML and PHP for display, use CDATA tags to auto-escape your angled brackets, and pre to preserve newlines:

<pre><![CDATA[
Place code here
]]></pre>

Power users, you can hide this notice with:

.htmlpurifier-help {display:none;}

Message: