lipo999 Posted January 9, 2018 Share Posted January 9, 2018 Hello, my code is: <input id="button" type="button" value="Login" onclick="moje2()" /> but I cannot put onclick="moje2()". I save cms page, but the code disapear. Please, can somebody help? Thank you so much. Link to comment Share on other sites More sharing options...
musicmaster Posted January 9, 2018 Share Posted January 9, 2018 In Settings->General in the backoffice you will find something about iframes and purifier. It might be that one of those "clean code" settings removes your code. Link to comment Share on other sites More sharing options...
phpist Posted January 9, 2018 Share Posted January 9, 2018 Hi @lipo999 Try to disable "Use HTMLPurifier Library" under Preferences -> Generals and try again. let me know if this doesnt work for you and please provide which PS version you're on. Cheers Link to comment Share on other sites More sharing options...
lipo999 Posted January 9, 2018 Author Share Posted January 9, 2018 Hello Both, I tried at first disable HTML Purifier. Without success. I wanna put in cms something like <input onclick="function"> Version is 1.6.1.17 Thanks for help. Link to comment Share on other sites More sharing options...
phpist Posted January 9, 2018 Share Posted January 9, 2018 Hello @lipo999 I know why it prevents you from inserting such tags, it's because in the CMS class file, you will find this line of code : 'content' => array('type' => self::TYPE_HTML, 'lang' => true, 'validate' => 'isCleanHtml', 'size' => 3999999999999), All you need to do here is to remove this piece of code: 'validate' => 'isCleanHtml' Don't forget to extend this class from the override folder so everything stays clean for any future upgrades. Good luck Cheers 1 Link to comment Share on other sites More sharing options...
lipo999 Posted January 10, 2018 Author Share Posted January 10, 2018 Hello thanks for advice. I delete this piece of code, without success. I removed it from CMS.php in classes folder. Link to comment Share on other sites More sharing options...
phpist Posted January 10, 2018 Share Posted January 10, 2018 I think maybe there is another CMS file which overrides the original one, did you check this? because it works fine for me when I removed that piece of the code 1 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