HTMLPurifier syntax issue -


I am using HTMLPurifier with this configuration:

  case 'comment' : $ config = HTMLPurifier_Config :: createDefault (); Config- & gt; Set ('core. Encoding', 'utf-8'); $ Config- & gt; Set ('HTML.Allowed', 'iframe [src | width | height | frameborder | acceptable screen], p [style], p, br, hr, center, em, u, ul, li, font, ol, div [class] | Style], span [style], blockquote, strike, b, strong, img [src | alt | class | height | width], a [href | rel], object [width | height | data], absolute [name | Value], embed [source | type | permissions effect | width | height] '); $ Config- & gt; Set ('HTML.SafeIframe' is true); $ Config- & gt; Set ('URI.SafeIframeRegexp', '% ^ // (www.youtube.com/embed/playplayer.vimeo.com/video/)%'); $ Config- & gt; Set ('Cache.DefinitionImpl', null); // TODO: remove it later! break;   

When accepting a YouTube video, the acceptable screen attribute is stripped of why?

The reason for this is that the attribute is not currently supported by safe iframe. You can support yourself using

Comments

Popular posts from this blog

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

c# - Split String between 2 substrings without removing delimiters -

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -