DNNCommunity / Dnn.CommunityForums

Open-source forums module for DNN Platform. This is a fork and continuance of the Active Forums module.
https://dnncommunity.org
Other
13 stars 21 forks source link

Localization can break javascript functions #84

Open valadas opened 3 years ago

valadas commented 3 years ago

Describe the bug

Localized strings are injected into javascript single quote strings without any processing. Should any localized text have a single quote, it will break the function such as in screenshot below

Software Versions

To Reproduce

Steps to reproduce the behavior:

  1. Install the module on a site with french localization
  2. Install the localization pack here: ResourcePack.Active Forums.6.5.1.fr-FR.zip
  3. Try to create a new forum
  4. See error in browser console.

Expected behavior

Localization text should be processed to escape single quotes.

Screenshots

image

valadas commented 3 years ago

As a workaround for now I will edit the localization file to remove the single quote somehow. If others have the same issue, it's in ControlPanel.ascs.resx and the key name is [RESX:Actions:DeleteComplete].Text

valadas commented 3 years ago

And [RESX:Actions:ForumDeleted].Text too