Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
1 + 5 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

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";

Who's Online

192 user(s) are online (132 user(s) are browsing Support Forums)


Members: 0


Guests: 192


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits