Menu

#22 [IMG] tag doesn't work with extensions in capitals.

open-accepted
Bug fix (25)
5
2011-01-12
2010-10-31
Anonymous
No

It is common that pictures have an extension in capitals, like .JPG or .GIF. For example some digital cameras like to name files like that. However, the [IMG] tag will be invalidated then. To test with:

[IMG]http://www.google.nl/intl/nl_nl/images/logo.GIF[/IMG]

Possible (and most likely) fix:
Change Line 506 of nbbc_lib.php from:

if (preg_match("/\\.(?:gif|jpeg|jpg|jpe|png)$/", $content)) {

to

if (preg_match("/\\.(?:gif|jpeg|jpg|jpe|png)$/i", $content)) {

Thanks in advance.

Really like this parser, it works really well.

Discussion

  • phantom-inker

    phantom-inker - 2011-01-12
    • assigned_to: nobody --> phantom-inker
    • status: open --> open-accepted
     
  • phantom-inker

    phantom-inker - 2011-01-12

    This is a reasonable suggestion, and I'll update NBBC accordingly in the next release.

     

Log in to post a comment.

MongoDB Logo MongoDB