Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Please sign in or apply for membership to remove the ads
    • CommentAuthorkanjigirl
    • CommentTimeNov 6th 2005
     
    How can I get an apostrophe to show up properly in an album title?

    http://parallaxwebdesign.com/projects/waterline/plogger/index.php?level=collection&id=1

    See Red Butte Children's Garden? It's inserted a backslash - can I get around this?
    • CommentAuthorjack
    • CommentTimeNov 6th 2005
     
    This is fixed in the nightly builds. You could give it a try with these versions or wait for the official next release.
    • CommentAuthorjack
    • CommentTimeNov 6th 2005 edited
     
    Correction: It's not entirely fixed, I just noticed that and placed a new ticket on the trac pages.
    •  
      CommentAuthormike
    • CommentTimeNov 6th 2005 edited
     
    PHP uses the escape character '/' in order to properly insert apostrophes without cutting the SQL query short. Before displaying text pulled from the database, you should use stripslashes on it (PHP function that removes escape characters).

    Apprently we've forgotten to do this is a few spots, but you can easily fix it yourself if you want.

    Line 532 in gallery.php
    $output.= $row["name"].'

    change that to:
    $output.= SmartStripSlashes($row["name"]).'

    You can add that SmartStripSlashes function to any string output where you see the escaped apostrophe.
    • CommentAuthorkanjigirl
    • CommentTimeNov 7th 2005
     
    That did it! Thanks.

    Debbie
    • CommentAuthorsnow
    • CommentTimeJan 8th 2006
     
    I had the same problem with the comments under photos in version b2.1:

    line 909 of gallery.php:

    $output .= "<p>".htmlspecialchars($row["comment"])."</p>";

    I changed to:

    $output .= "<p>".htmlspecialchars(SmartStripSlashes($row["comment"]))."</p>";

    Hope that may be of help...

    I can write code!

    *so proud*

    :) :) :)