【问题标题】:PHP Codeigniter bypass html_scape functionPHP Codeigniter 绕过 html_scape 函数
【发布时间】:2020-04-21 19:38:13
【问题描述】:

我正在运行一个 php codeigniter 应用程序,我需要绕过 html_escape 函数将嵌入的 html 代码插入到数据库中。

这是我需要插入数据库的示例:

<script type='text/javascript' charset='utf-8' scr='https://www.buzzsprout.com/423805.js?container_id=buzzsprout-small-player-423805&player=small'></script>

我试过了

$data['url'] = $this->input->post('podcast_url');

但它不断将[removed][removed] 插入数据库。如果我只使用链接,它可以正常工作。

有没有办法绕过它?

【问题讨论】:

  • 我不确定是否了解您的问题。我想你必须写“

标签: php codeigniter html-escape-characters


【解决方案1】:

application/config/config.php中的配置改为

$config['global_xss_filtering'] = FALSE;

Reference

相关问题:- Codeigniter - Disable XSS filtering on a post basis

【讨论】:

    猜你喜欢
    • 2013-06-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多