leizongmin / js-xss

Sanitize untrusted HTML (to prevent XSS) with a configuration specified by a Whitelist
http://jsxss.com
Other
5.2k stars 629 forks source link

jsxss.com is not working because of lang forward rules #182

Closed sijanec closed 4 years ago

sijanec commented 4 years ago

off-topic, but still related:

script in index HTML file on jsxss.com page will redirect a client to an unexistent folder based on their client's (browser's) language code.

for example if my language is sl, I would be redirected to /sl/index.html, which will result in a 404. very annoying.

  | <script>
-- | --
  | var lang = 'en';
  | try {
  | lang = navigator.language.split('-')[0];
  | } catch (err) {
  | alert(err);
  | }
  | location.replace('/' + lang + '/index.html');
  | </script>
  |  
leizongmin commented 4 years ago

Thank you for your report. Just fixed this problem.