开发者

Execute Javascript code in Drupal descriptions

Is it possible to execute Javascript code in th开发者_高级运维e Body/Description of a Drupal node? It won't be in PHP input mode.


Use drupal_add_js() in either a custom module or the theme template.php.

Although (not recommended) if you disable HTML Filter in the Input Formats, it should let you paste script code. This WILL open you up to XSS attacks though, depending on other settings.


Alert! This means your site is a high security risk. You're leaving it open to being used for Cross Site Scripting attacks. You'd be better of not implementing this idea. Developers are better of not advising someone on how to do this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜