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