FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » img bug introduced in most recent revision
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: img bug introduced in most recent revision [message #158592 is a reply to message #158589] Thu, 05 March 2009 10:51 Go to previous messageGo to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma:
Senior Member
Administrator
Core Developer
Hi Marticus,

The bug-rate is extremely low given the amount of changes introduced. However, I would be keen to know how "we" (as you've rightfully stated) can test every feature of such a large project more effectively. Maybe someone need to write a test-suite for us?

Anyway, here is a patch (I'm sure you could've prepared it yourself). However, I'm not going to commit it before "we" haven't tested it properly.

Index: post_proc.inc.t
===================================================================
RCS file: /forum21/install/forum_data/src/post_proc.inc.t,v
retrieving revision 1.99
diff -u -r1.99 post_proc.inc.t
--- post_proc.inc.t     22 Feb 2009 00:00:37 -0000      1.99
+++ post_proc.inc.t     5 Mar 2009 10:49:33 -0000
@@ -588,11 +588,11 @@
        ),
        $fudml);

-       while (preg_match('!<img src="(.*?)" border="0" alt="\\1">!is', $fudml)) {
-               $fudml = preg_replace('!<img src="(.*?)" border="0" alt="\\1">!is', '[img]\1[/img]', $fudml);
+       while (preg_match('!<img src="?(.*?)"? border="0" alt="\\1" ?/?>!is', $fudml)) {
+               $fudml = preg_replace('!<img src="?(.*?)"? border="0" alt="\\1" ?/?>!is', '[img]\1[/img]', $fudml);
        }
-       while (preg_match('!<img class="(r|l)" src="(.*?)" border="0" alt="\\2">!is', $fudml)) {
-               $fudml = preg_replace('!<img class="(r|l)" src="(.*?)" border="0" alt="\\2">!is', '[img\1]\2[/img\1]', $fudml);
+       while (preg_match('!<img class="(r|l)" src="(.*?)" border="?0"? alt="\\2" ?/?>!is', $fudml)) {
+               $fudml = preg_replace('!<img class="(r|l)" src="?(.*?)"? border="0" alt="\\2" ?/?>!is', '[img\1]\2[/img\1]', $fudml);
        }
        while (preg_match('!<a href="mailto:(.+?)" target="_blank">\\1</a>!is', $fudml)) {
                $fudml = preg_replace('!<a href="mailto:(.+?)" target="_blank">\\1</a>!is', '[email]\1[/email]', $fudml);
@@ -602,10 +602,10 @@
        }

        if (strpos($fudml, '<img src="') !== false) {
-               $fudml = preg_replace('!<img src="(.*?)" border="0" alt="(.*?)">!is', '[img=\1]\2[/img]', $fudml);
+               $fudml = preg_replace('!<img src="(.*?)" border="?0"? alt="(.*?)" ?/?>!is', '[img=\1]\2[/img]', $fudml);
        }
        if (strpos($fudml, '<img class="') !== false) {
-               $fudml = preg_replace('!<img class="(r|l)" src="(.*?)" border="0" alt="(.*?)">!is', '[img\1=\2]\3[/img\1]', $fudml);
+               $fudml = preg_replace('!<img class="(r|l)" src="(.*?)" border="?0"? alt="(.*?)" ?/?>!is', '[img\1=\2]\3[/img\1]', $fudml);
        }
        if (strpos($fudml, '<a href="mailto:') !== false) {
                $fudml = preg_replace('!<a href="mailto:(.+?)" target="_blank">(.+?)</a>!is', '[email=\1]\2[/email]', $fudml);


Best regards.

Frank
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: deleting attachments causes attachment list problem
Next Topic: Users missing in Group Manager
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Jul 01 09:27:12 GMT 2024

Total time taken to generate the page: 0.06645 seconds