scatty Posted May 17, 2014 Share Posted May 17, 2014 Hi, i am trying to add pdf file to my CMS page. I have uploaded it to SlideShare and i have embed code. It is in iframe. I tried opening CMS page editor and in this editor open "cource code" and add it, but I can't save it because it's invalid content.So I want to add this embed code to source code manually but i dont know what file is it?Thank you for any help,Scatty Link to comment Share on other sites More sharing options...
misthero Posted May 17, 2014 Share Posted May 17, 2014 iframes are not allowed by default you could write an override of Validate.php changing the function isCleanHtml to always allow iframes. Link to comment Share on other sites More sharing options...
Reiskanen Posted May 26, 2014 Share Posted May 26, 2014 iframes are not allowed by default you could write an override of Validate.php changing the function isCleanHtml to always allow iframes. where can I find that "validate.php" ? Is there any other ways to import slideshare? Link to comment Share on other sites More sharing options...
misthero Posted May 26, 2014 Share Posted May 26, 2014 (edited) create the folders and the file override/classes/Validate.php paste inside the file this: class Validate extends ValidateCore { 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 (false && preg_match('/<[\s]*(i?frame|form|input|embed|object)/ims', $html)) return false; return true; } } after that clear preastoshop cache i don't know if there is any other way ignore this! listen to vekia below! I totally forgot that option!! Edited May 27, 2014 by misthero (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted May 26, 2014 Share Posted May 26, 2014 if you want to include iframe it's enough to turn iframes on under preferences > general tab in back office. 2 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