Fix special characters in titles and captions

Permalink Browser Info Environment
First of all: Thank you for this awesome add-on and the superb support on it. If you are thinking of getting a gallery add-on for your site you can stop right now and just go ahead and put in those $25 and become a very happy customer.

Now since I'm doing my site for a Swedish company there will be a lot a special characters in both titles and descriptions, and it all looks good until you want to edit your gallery. When you do all the umlauts and other special chars screws up. To get around that problem you need to change all instances of:
htmlspecialchars($string, ENT_QUOTES, 'UTF-8')

to
htmlentities($string, ENT_QUOTES, 'UTF-8')


htmlspecialchars() only converts the following special chars to HTML:
'&' (ampersand) becomes '&'
'"' (double quote) becomes '"' when ENT_NOQUOTES is not set.
''' (single quote) becomes ''' only when ENT_QUOTES is set.
'<' (less than) becomes '&lt;'
'>' (greater than) becomes '&gt;'

htmlentities() takes care of the above as well as the rest of all applicable characters.

I hope this can help at least someone who has stumbled upon the same problem as I did. It might be obvious for all you PHP programmers out there, but it took me (the n00b) some time to actually find out why my characters were all messed up after edit.

Type: Discussion
Status: New
adajad
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
Thank you for bringing this to my attention. I have implemented this fix in the latest version of Deluxe Image Gallery (1.0.4)

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.