In the default Content Editor of phpcms V9 background, JavaScript scripts are disabled by default for security reasons.ArticleWhile adding JSCodeBut it does not actually work, but is displayed in text format. Therefore, you often need to modify this restriction so that JS Code can be displayed on the Content Page of the article.
Make the Content Page Support Javascript. The specific modification method is as follows:
Find the function in the file caches \ caches_model \ caches_data \ content_input.class.php:
Function get ($ data, $ isimport = 0 ){
$ This-> DATA = $ DATA = trim_script ($ data );
To:
Function get ($ data, $ isimport = 0 ){
$ This-> DATA = $ data; // do not call the filter function
This is mentioned in many places on the Internet. In fact, this setting alone is not enough, because it is only something in the cache that needs to be
Fundamentally changed:
Find the get function from phpcms/modules/content/fields/content_input.class.php and follow the preceding modification method,
This completely solves this problem.