| Re: CBB - img tags case sensitive? |
| by file2mail on 2010/5/18 13:24:56 Why hasnt this ever been fixed in the xoops source? Most other cms/blog systems will be case insensitive for bbcodes. its a simple code update really. just change all /sU to /isU in the textsanitizer module for xoopsCodeDecode |
| Re: CBB - img tags case sensitive? |
| by Daethian on 2010/4/24 22:59:16 ghia thank you! That finally did it! I need really specific directions...obviously. |
| Re: CBB - img tags case sensitive? |
| by ghia on 2010/4/24 18:30:22 The modification is not about adding lines, but changing lines by adding the modifier i to the pattern. le="color: #000000"><?php $ts->patterns[] = "/[img](.*)[/img]/sU"; =>le="color: #000000"><?php $ts->patterns[] = "/[img](.*)[/img]/isU"; and this for all patterns containing [img]. |
| Re: CBB - img tags case sensitive? |
| by Daethian on 2010/4/24 0:11:02 Tried adding: le="color: #000000"><?php $ts->patterns[] = "/Open in new window/isU"; and that doesn't fix IMG
|
| Re: CBB - img tags case sensitive? |
| by Daethian on 2010/4/24 0:03:40 Okay opened the image.php file and added one line, updated to add the $ts at the beginning. And it made the site inaccessible. le="color: #000000"><?php class MytsImage extends MyTextSanitizerExtension { function load(&$ts) { static $jsLoaded; $config = $this->loadConfig(dirname(__FILE__)); $ts->patterns[] = "/[img align=(['"]?)(left|center|right)\1 width=(['"]?)([0-9]*)\3]([^"()?&'<>]*)[/img]/sU"; $ts->patterns[] = "/[img align=(['"]?)(left|center|right)\1]([^"()?&'<>]*)[/img]/sU"; $ts->patterns[] = "/[img width=(['"]?)([0-9]*)\1]([^"()?&'<>]*)[/img]/sU"; $ts->patterns[] = "/[img]([^"()?&'<>]*)[/img]/sU"; $ts->patterns[] = "/[IMG]([^"()?&<>]*)[/IMG]/sU"; // Added for script driven images $ts->patterns[] = "/[img align=(left|right|center) width=([0-9]*)](.*)[/img]/sU"; $ts->patterns[] = "/[img width=([0-9]*) align=(left|right|center)](.*)[/img]/sU"; $ts->patterns[] = "/[img align=(left|right|center)](.*)[/img]/sU"; $ts->patterns[] = "/[img width=([0-9]*)](.*)[/img]/sU"; $ts->patterns[] = "/[img](.*)[/img]/sU"; $ts->patterns[] = "/[img align=(['"]?)(left|center|right)\1 id=(['"]?)([0-9]*)\3]([^"()?&'<>]*)[/img]/sU"; $ts->patterns[] = "/[img id=(['"]?)([0-9]*)\1]([^"()?&'<>]*)[/img]/sU";
|