Quokka Web Posted September 22, 2016 Share Posted September 22, 2016 (edited) Hi, I encountered a problem when editing a CMS content. I wanted to center an image. In the source code, I had <p><img style="margin-left: auto; margin-right: auto; display: block;" src="http://localhost/mywebsite/img/cms/test.jpg" alt="Imprimantes" width="848" height="566" /></p> but after saving the content the display: block; disappeared so the image was not centered in the content. After investigation, i noticed that the library HTMLPurifier was removing the display: block;. OK I can disable the HTML Purifier in the configuration but this kind of thing is legitimate in HTML so I would propose to disable this kind of filtering by allowing tricky CSS. In Tools::purifyHTML(...), it could be interesting to add $config->set('CSS.AllowTricky', true); so the code can be purified and display: block; will not disappear anymore. Is there any Prestashop developer who can validate this suggestion? and maybe implement it in a next version of Prestashop? Edited September 22, 2016 by titchagcreation (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted September 23, 2016 Share Posted September 23, 2016 You should post this as a feature request on the Forge here. 1 Link to comment Share on other sites More sharing options...
Quokka Web Posted September 23, 2016 Author Share Posted September 23, 2016 Thank you for your proposal.Finally I proposed a code modification directly in github. I hope it will be accepted! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now