Jump to content

Can't save cms page with javascript code


Recommended Posts

I've added this code to a cms page via the html text editor but prestashop won't allow me to save the page - the text field content is invalid.

<p><a class="stat Off" onclick="jnf.go('http://app.livechatoo.com/brany/client-embed/sk/offline'); return false;" href="javascript:void(0)">Neváhajte a kľudne nás kontaktuje!</a></p>

Does the cms editor have a blacklist of characters that can't be stored?

post-34484-0-76861600-1391649370_thumb.png

Link to comment
Share on other sites

no, your shop will be secured.

this restriction related to js tags is there because not everyone are familiar with javascript. And if you will use wrong javascript code - it can disable a lot of important features in shop, also it can crash javascripts at all (in your front office only). This is why this feature is disabled by default.

 

so, if you want to enable it - you have to be sure that you know what you're doing with js scripts :)

Link to comment
Share on other sites

no, your shop will be secured.

this restriction related to js tags is there because not everyone are familiar with javascript. And if you will use wrong javascript code - it can disable a lot of important features in shop, also it can crash javascripts at all (in your front office only). This is why this feature is disabled by default.

 

so, if you want to enable it - you have to be sure that you know what you're doing with js scripts :)

Thanks Milos, hopefully I won't break anything :) Too bad there isn't a simple checkbox hidden somewhere in the superadmin backoffice that would enable this feature. Will have to dig out the piece of code I need to change but this problem does not have a high pririty so I will (hopefully) write a solution later when I get to modifying this.

Link to comment
Share on other sites

  • 4 weeks later...

Can't find the files you mention in your tutorial. My admin/themes directory contains only flashyturtle, oldchool and origins :/

 

Can the modifications be done in prestashop 1.4?

 

ohh so you use 1.4 ?! i missed your signature...

guide that i created is for prestashop 1.5.x

it can be done for ps 1.4 but in a little different way.

 

 

I dream of the day ps supports tinymce config like joomla did even four years ago.  :)

 

Milos, this would be great module for you.  :)

 

sadly modules like that need overrides, i don't like it :P

Link to comment
Share on other sites

×
×
  • Create New...