Changeset 1535
- Timestamp:
- 03/01/08 13:26:32 (2 months ago)
- Files:
-
- branches/punbb-1.3-dev/extras/db_update.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/punbb-1.3-dev/extras/db_update.php
r1533 r1535 235 235 236 236 // Replace numeric entities 237 $str = preg_replace_callback('/&#([0-9]+);/', create_function('$s', 'return dcr2utf8($s[1]);'), $str);238 $str = preg_replace_callback('/&#x([a-f0-9]+);/i', create_function('$s', 'return dcr2utf8(hexdec($s[1]));'), $str);237 $str = preg_replace_callback('/&#([0-9]+);/', 'utf8_callback_1', $str); 238 $str = preg_replace_callback('/&#x([a-f0-9]+);/i', 'utf8_callback_2', $str); 239 239 240 240 return ($save != $str); 241 } 242 243 244 function utf8_callback_1($matches) 245 { 246 return dcr2utf8($matches[1]); 247 } 248 249 250 function utf8_callback_2($matches) 251 { 252 return dcr2utf8(hexdec($matches[1])); 241 253 } 242 254
