petitssuisses / piwigo-ShareAlbum

Share Album is a Piwigo plugin to enable private categories sharing via a public URL
16 stars 11 forks source link

Fix en_UK JavaScript message breakage #76

Closed erAck closed 3 years ago

erAck commented 3 years ago

The message is used in JavaScript and ended up as

alert('Link was successfully copied to the clipboard. You can now use the system's paste functionality to share it!');

where the "system's" apostrophe breaks the quoting level, leading to no image being displayed.

Use "system\\'s" in source to get "system\'s" in JavaScript.

erAck commented 3 years ago

Actually all translations of messages used in include/public_events.inc.php as TSHAREALBUM... should be checked and some mechanism introduced that this can't happen and messages be automatically escaped. You can't expect translators to check how a message is used and know proper escaping.

For example, Catalan ca_ES language uses plenty apostrophes.

erAck commented 3 years ago

I'll come up with a better approach.