2013-11-25, 08:15 PM
As I cannot login to redmine I post my issue here:
If you put two images in one line (using mycode) the mycode_parse_img_callback1 function adds a newline to the output, resulting in a <br> tag in the html code.
E.g.: (no line break between the img tags!)
![[Image: xavatar_mnt.png.pagespeed.ic.9QWXjXAwoS.png]](https://camo.mybb.com/d069b35c4ee24090c9d22084953bb5afb2865c79/687474703a2f2f7777772e6f70742d636f6d6d756e6974792e64652f466f72756d2f696d616765732f63632f617661746172652f786176617461725f6d6e742e706e672e7061676573706565642e69632e395157586a5841776f532e706e67)
![[Image: xavatar_mnt.png.pagespeed.ic.9QWXjXAwoS.png]](https://camo.mybb.com/d069b35c4ee24090c9d22084953bb5afb2865c79/687474703a2f2f7777772e6f70742d636f6d6d756e6974792e64652f466f72756d2f696d616765732f63632f617661746172652f786176617461725f6d6e742e706e672e7061676573706565642e69632e395157586a5841776f532e706e67)
Only the mycode_parse_img_callback1 function adds the newline, the other versions don't do that.
My quick fix, not tested that much yet:
A user land workaround would be to force one of the other callback functions like this:
[img align=lef]http://www.opt-community.de/Forum/images/cc/avatare/xavatar_mnt.png.pagespeed.ic.9QWXjXAwoS.png[/img]![[Image: xavatar_mnt.png.pagespeed.ic.9QWXjXAwoS.png]](https://camo.mybb.com/d069b35c4ee24090c9d22084953bb5afb2865c79/687474703a2f2f7777772e6f70742d636f6d6d756e6974792e64652f466f72756d2f696d616765732f63632f617661746172652f786176617461725f6d6e742e706e672e7061676573706565642e69632e395157586a5841776f532e706e67)
If you put two images in one line (using mycode) the mycode_parse_img_callback1 function adds a newline to the output, resulting in a <br> tag in the html code.
E.g.: (no line break between the img tags!)
[img]http://www.opt-community.de/Forum/images/cc/avatare/xavatar_mnt.png.pagespeed.ic.9QWXjXAwoS.png[/img][img]http://www.opt-community.de/Forum/images/cc/avatare/xavatar_mnt.png.pagespeed.ic.9QWXjXAwoS.png[/img]
Only the mycode_parse_img_callback1 function adds the newline, the other versions don't do that.
My quick fix, not tested that much yet:
function mycode_parse_img_callback1($matches)
{
#return $this->mycode_parse_img($matches[2])."\n";
return $this->mycode_parse_img($matches[2]);
}
A user land workaround would be to force one of the other callback functions like this:
[img align=xyz]http://www.opt-community.de/Forum/images/cc/avatare/xavatar_mnt.png.pagespeed.ic.9QWXjXAwoS.png[/img][img]http://www.opt-community.de/Forum/images/cc/avatare/xavatar_mnt.png.pagespeed.ic.9QWXjXAwoS.png[/img]
[img align=lef]http://www.opt-community.de/Forum/images/cc/avatare/xavatar_mnt.png.pagespeed.ic.9QWXjXAwoS.png[/img]