Welcome! » Log In » Create A New Profile

How to remove unclose alt=" in img?

Posted by macieksk 
How to remove unclose alt=" in img?
March 18, 2017 03:33AM

hi!

how to set config to remove unclose alt=" in img?

for ex:

<img src="http://somedomain.com/image.png" alt="ccc 

this is my config.

return [

	&#039;encoding&#039;      => &#039;UTF-8&#039;,
	&#039;finalize&#039;      => true,
	&#039;cachePath&#039;     => storage_path( &#039;app/purifier&#039; ),
	&#039;cacheFileMode&#039; => 0755,
	&#039;settings&#039;      => [
		&#039;default&#039; => [
			&#039;HTML.Doctype&#039;           => &#039;XHTML 1.0 Strict&#039;,
			&#039;HTML.Allowed&#039;           => &#039;b,strong,i,em,a[href|title],ul,ol,li,p[style],br,span[style],img[width|height|alt|src]&#039;,
			&#039;HTML.ForbiddenElements&#039; => &#039;div,alt,title&#039;,
			&#039;CSS.AllowedProperties&#039;  => &#039;font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align&#039;,
			&#039;AutoFormat.AutoParagraph&#039; => true,
			&#039;AutoFormat.RemoveEmpty&#039;   => true,
		],
		&#039;test&#039;    => [
			&#039;Attr.EnableID&#039; => true
		],
		"youtube" => [
			"HTML.SafeIframe"      => &#039;true&#039;,
			"URI.SafeIframeRegexp" => "%^(http://|https://|//)(www.youtube.com/embed/|player.vimeo.com/video/)%",
		],
	],

];
Re: How to remove unclose alt=" in img?
March 18, 2017 03:53AM

There isn't any option that does exactly what you are asking for, sorry.

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: