Creastyle Posted October 14, 2014 Share Posted October 14, 2014 Hi, the image overlay function which was very nice on the 1.5 version of PrestaShop, no longer seems to work on version 1.6 in a cms page. When I import a html code with this feature, registration is refused. I do not know what changed, but I think it happens in the validate.php not file? could someone help me? thank you Link to comment Share on other sites More sharing options...
vekia Posted October 15, 2014 Share Posted October 15, 2014 hello, i don't understand what's going on well what code you're trying to insert to your cms page? also, when you save this code, what kind of issues you've got then? Link to comment Share on other sites More sharing options...
Creastyle Posted October 15, 2014 Author Share Posted October 15, 2014 So I wanted to place an image rollover in a cms page, but the function does not exist with prestashop 1.6. I create the html code with a 1.5 version of PrestaShop, and when I paste the html code into a cms page PrestaShop 1.6, it refuses validation. He said: the description field is not valid. I finally succeeded in making a lot of changes: 1) I replaced the tinymce js file with version 1.5 prestashop 2) I changed the file and replaced it validate.php public static function isCleanHtml($html, $allow_iframe = false) { $events = 'onmousedown|onmousemove|onmmouseup|onmouseover|onmouseout|onload|onunload|onfocus|onblur|onchange'; $events .= '|onsubmit|ondblclick|onclick|onkeydown|onkeyup|onkeypress|onmouseenter|onmouseleave|onerror|onselect|onreset|onabort|ondragdrop|onresize|onactivate|onafterprint|onmoveend'; $events .= '|onafterupdate|onbeforeactivate|onbeforecopy|onbeforecut|onbeforedeactivate|onbeforeeditfocus|onbeforepaste|onbeforeprint|onbeforeunload|onbeforeupdate|onmove'; $events .= '|onbounce|oncellchange|oncontextmenu|oncontrolselect|oncopy|oncut|ondataavailable|ondatasetchanged|ondatasetcomplete|ondeactivate|ondrag|ondragend|ondragenter|onmousewheel'; $events .= '|ondragleave|ondragover|ondragstart|ondrop|onerrorupdate|onfilterchange|onfinish|onfocusin|onfocusout|onhashchange|onhelp|oninput|onlosecapture|onmessage|onmouseup|onmovestart'; $events .= '|onoffline|ononline|onpaste|onpropertychange|onreadystatechange|onresizeend|onresizestart|onrowenter|onrowexit|onrowsdelete|onrowsinserted|onscroll|onsearch|onselectionchange'; $events .= '|onselectstart|onstart|onstop'; if (preg_match('/<[\s]*script/ims', $html) || preg_match('/('.$events.')[\s]*=/ims', $html) || preg_match('/.*script\:/ims', $html)) return false; if (!$allow_iframe && preg_match('/<[\s]*(i?frame|form|input|embed|object)/ims', $html)) return false; return true; } with public static function isCleanHtml($html, $allow_iframe = false) { return true; } Then I disabled the Use htmlpurifier library in preferences. Now it works but my method is certainly not correct Link to comment Share on other sites More sharing options...
vekia Posted October 15, 2014 Share Posted October 15, 2014 what code you're trying to insert to your cms page? Link to comment Share on other sites More sharing options...
Recommended Posts