source: branches/rel/data/smarty_extends/modifier.script_escape.php @ 14464

Revision 14464, 316 bytes checked in by adati, 17 years ago (diff)
Line 
1<?php
2/**
3 * Script¥¿¥°¤ò¥¨¥¹¥±¡¼¥×
4 * Á´¤Æ¤Î¥Ú¡¼¥¸¤ËŬÍѤµ¤ì¤ë
5 *
6 * @param string $value ÆþÎÏ
7 * @return string ½ÐÎÏ
8 */
9function smarty_modifier_script_escape($value) {
10   
11    if (empty($value)) { return; }
12   
13    return preg_replace("/<script.*?>|<\/script>/", '&lt;script&gt;', $value);
14}
15?>
Note: See TracBrowser for help on using the repository browser.