','',$str);$str=preg_replace('~/\*[]+\*/~i','',$str);$str=preg_replace('/\\\0{0,4}4[0-9a-f]/' />

熟女伦乱激情网一区二区,十八禁免费漫画在线观看,欲色欲香天天网综合久久,美女无遮挡隐私叼嗨网站

public static function removeXSS($str) {
    $str = str_replace('{C}', '', $str);
    $str = preg_replace('~/\*[ ]+\*/~i', '', $str);
    $str = preg_replace('/\\\0{0,4}4[0-9a-f]/is', '', $str);
    $str = preg_replace('/\\\0{0,4}5[0-9a]/is', '', $str);
    $str = preg_replace('/\\\0{0,4}6[0-9a-f]/is', '', $str);
    $str = preg_replace('/\\\0{0,4}7[0-9a]/is', '', $str);
    $str = preg_replace('/?{0,8}[0-9a-f]{2};/is', '', $str);
    $str = preg_replace('/?{0,8}[0-9]{2,3};/is', '', $str);
    $str = preg_replace('/?{0,8}[0-9]{2,3};/is', '', $str);

    $str = htmlspecialchars($str);
    //$str = preg_replace('/
    //$str = preg_replace('/>/i', '>', $str);

    // 非成對標(biāo)簽
    $lone_tags = array("img", "param", "br", "hr");
    foreach ($lone_tags as $key => $val)
    {
      $val = preg_quote($val);
      $str = preg_replace('/<' . $val . '(.*)(\/?)>/isU', '<' . $val . "\\1\\2>", $str);
      $str = self::transCase($str);
      $str = preg_replace_callback('/<' . $val . '(.+?)>/i', create_function('$temp', 'return str_replace(""","\"",$temp[0]);'), $str);
    }
    $str = preg_replace('/&/i', '&', $str);

    // 成對標(biāo)簽
    $double_tags = array("table", "tr", "td", "font", "a", "object", "embed", "p", "strong", "em", "u", "ol", "ul", "li", "div", "tbody", "span", "blockquote", "pre", "b", "font");
    foreach ($double_tags as $key => $val)
    {
      $val = preg_quote($val);
      $str = preg_replace('/<' . $val . '(.*)>/isU', '<' . $val . "\\1>", $str);
      $str = self::transCase($str);
      $str = preg_replace_callback('/<' . $val . '(.+?)>/i', create_function('$temp', 'return str_replace(""","\"",$temp[0]);'), $str);
      $str = preg_replace('/<\/' . $val . '>/is', ' . $val . ">", $str);
    }
    // 清理js
    $tags = Array(
        'javascript',
        'vbscript',
        'expression',
        'applet',
        'meta',
        'xml',
        'behaviour',
        'blink',
        'link',
        'style',
        'script',
        'embed',
        'object',
        'iframe',
        'frame',
        'frameset',
        'ilayer',
        'layer',
        'bgsound',
        'title',
        'base',
        'font'
    );

    foreach ($tags as $tag)
    {
      $tag = preg_quote($tag);
      $str = preg_replace('/' . $tag . '\(.*\)/isU', '\\1', $str);
      $str = preg_replace('/' . $tag . '\s*:/isU', $tag . '\:', $str);
    }

    $str = preg_replace('/[\s]+on[\w]+[\s]*=/is', '', $str);

    Return $str;
  }

穩(wěn)定

產(chǎn)品高可用性高并發(fā)

貼心

項目群及時溝通

專業(yè)

產(chǎn)品經(jīng)理1v1支持

快速

MVP模式小步快跑

承諾

我們選擇聲譽(yù)

堅持

10年專注高端品質(zhì)開發(fā)
  • 返回頂部
闽清县| 文昌市| 长宁区| 青州市| 大渡口区| 仲巴县| 昌宁县| 桐梓县| 株洲市| 灯塔市| 常州市| 科技| 綦江县| 翼城县| 临沧市| 调兵山市| 余庆县| 秦安县| 年辖:市辖区| 旌德县| 长泰县| 峡江县| 凯里市| 道真| 保定市| 彩票| 武功县| 潞西市| 雅安市| 炎陵县| 资兴市| 修水县| 长沙县| 集安市| 改则县| 新郑市| 澳门| 中卫市| 大兴区| 惠州市| 正镶白旗|