Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_modules / smilies [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
27 Aug 2002 21:15:56 | postnuke_modules/smilies | pnuserapi.php,1.2,1.3 | Mike |
fix smilies with negative lookbehind assertion |
Update of /home/cvsroot/postnuke_modules/smilies In directory ns7.hostnuke.net:/tmp/cvs-serv24112 Modified Files: pnuserapi.php Log Message: fix smilies with negative lookbehind assertion Index: pnuserapi.php =================================================================== RCS file: /home/cvsroot/postnuke_modules/smilies/pnuserapi.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pnuserapi.php 3 Jul 2002 10:49:03 -0000 1.2 --- pnuserapi.php 27 Aug 2002 21:15:54 -0000 1.3 *************** *** 32,49 **** function smilies_userapi_transform($args) { ! static $search = array('/(:D|:-D|:grin:)/', ! '/(:\)|:-\)|:smile:)/', ! '/(:\(|:-\(|:sad:)/', ! '/(:o|:-o|:eek:)/', ! '/(:\?|:-\?|:\?\?\?:)/', ! '/(8\)|8-\)|:cool:)/', ! '/:lol:/', ! '/(:x|:-x|:mad:)/', ! '/(:P|:-P|:razz:)/', ! '/:oops:/', ! '/:cry:/', ! '/(:>|:->|:evil:)/', ! '/:roll:/', ! '/(;\)|;-\)|:wink:)/'); static $replace = array('<img src="modules/smilies/pnimages/happy.gif">', --- 32,51 ---- function smilies_userapi_transform($args) { ! // smilies NOT preceded by a "word" character \w ! // (= so-called "negative lookbehind assertion") ! static $search = array('/(?<!\w)(:D|:-D|:grin:)/', ! '/(?<!\w)(:\)|:-\)|:smile:)/', ! '/(?<!\w)(:\(|:-\(|:sad:)/', ! '/(?<!\w)(:o|:-o|:eek:)/', ! '/(?<!\w)(:\?|:-\?|:\?\?\?:)/', ! '/(?<!\w)(8\)|8-\)|:cool:)/', ! '/(?<!\w):lol:/', ! '/(?<!\w)(:x|:-x|:mad:)/', ! '/(?<!\w)(:P|:-P|:razz:)/', ! '/(?<!\w):oops:/', ! '/(?<!\w):cry:/', ! '/(?<!\w)(:>|:->|:evil:)/', ! '/(?<!\w):roll:/', ! '/(?<!\w)(;\)|;-\)|:wink:)/'); static $replace = array('<img src="modules/smilies/pnimages/happy.gif">',
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |