Wrong escaping used? Please check
- Status
- Open
- Subject
- Wrong escaping used? Please check
- Version
- 18.x
- Category
- Error
- Easy for Newbie Dev
- Less than 30-minutes fix
- Feature
- Admin Interface (UI)
- Resolution status
- New
- Submitted by
- hman
- Lastmod by
- hman
- Rating
- Description
Please correct me if I'm wrong (if I am, this bug may be resolved invalid). If not then these strings need a correction.
In /lib/prefs/feature.php I find these escaped strings, line 2082:
Copy to clipboard'feature_jquery_zoom' => [ 'name' => tra('jQuery zoom'), 'description' => tra('Enables zoom in images on mouseover or click. Used in Plugin Img with the parameter \"thumb=zoombox\"'), 'type' => 'flag', 'help' => 'PluginImg#Zoombox', 'default' => 'n', ],
And this is just one example, /lib/prefs/feature.php contains more.tra() is called with a string that is enclosed in single quote and that contains double quote characters. But why is there a backslash in front of them?
That should - to my understanding of PHP - be unnecessary. On the contrary, only single quotes inside single quote marked strings need a backslash escape. Escaping a double quote character inside single quote strings would lead to backslashes being shelled out to the user in plain visibility (and irritate fellow translators trying to catch this string 😊
Or did I miss something?
Thanks for bringing me up to speed
hman- Importance
- 3
- Easy to solve?
- 10 easy
- Priority
- 30
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 7726
- Created
- Tuesday 13 April, 2021 20:53:39 UTC
by hman - LastModif
- Tuesday 13 April, 2021 20:55:22 UTC