1
c0ntrite
CBB IMG case insensitive
  • 2008/1/17 15:28

  • c0ntrite

  • Just popping in

  • Posts: 21

  • Since: 2007/1/26


hi! i would like to ask if there is a way to make the [img] tag to work on both uppercase and lowercase? could't find:

$patterns[] = "/\[img]([^\"\(\)\?\&'<>]*)\[\/img\]/sU";

in Frameworks\textsanitizer\module.texsanitizer.php

help?

2
kgwolf
Re: CBB IMG case insensitive
  • 2008/1/22 7:22

  • kgwolf

  • Just popping in

  • Posts: 32

  • Since: 2008/1/21


When you create a forum, toward the bottom you see
Allowed Extensions:
then next to it
zip|gif|jpg

I have
zip|gif|jpg|jpeg|png|GIF|JPG|PNG|JPEG

You can edit the forum and stick it in there to.

3
windy
Re: CBB IMG case insensitive
  • 2008/2/6 3:53

  • windy

  • Just popping in

  • Posts: 9

  • Since: 2007/1/28


Hi I found that adding an i (the modifer for upper and lower case) worked for me.

Frameworks/textsanitizer/plugins/image.php lines 17-22 just add an i to the end after SU as below, tried it with the Frameworks\textsanitizer\module.texsanitizer.php file first but that didn't work for me.

$ts->patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1 width=(['\"]?)([0-9]*)\\3]([^\"\(\)\?\&'<>]*)\[\/img\]/sUi";
$ts->patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sUi";
$ts->patterns[] = "/\[img width=(['\"]?)([0-9]*)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sUi";
$ts->patterns[] = "/\[img]([^\"\(\)\?\&'<>]*)\[\/img\]/sUi";
$ts->patterns[] = "/\[img align=(['\"]?)(left|center|right)\\1 id=(['\"]?)([0-9]*)\\3]([^\"\(\)\?\&'<>]*)\[\/img\]/sUi";
$ts->patterns[] = "/\[img id=(['\"]?)([0-9]*)\\1]([^\"\(\)\?\&'<>]*)\[\/img\]/sUi";

info:http://www.regular-expressions.info/modifiers.html

Hope this helps
Sue x

Login

Who's Online

123 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 123


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits