v.shebanov 4 жил өмнө
parent
commit
d5cb33028e
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      web/src/utils.js

+ 1 - 1
web/src/utils.js

@@ -31,7 +31,7 @@ const SUBST = {
   '-':'-dash-'
 };
 const UNSUBST = Object.assign({}, ...Object.entries(SUBST).map(([a,b]) => ({[b]: a})))
-const FORW = new RegExp(/[:\/\\?#\[\]@~ _‐-]/, 'g');
+const FORW = new RegExp(/[:/\\?#[\]@~ _‐-]/, 'g');
 const BACK = new RegExp(`(${Object.values(SUBST).join('|')})`,'g');
 //export function slugify(str) { return str && encodeURI(str.replace(FORW, e=>SUBST[e])) }
 //export function unslugify(str) { return str && decodeURI(str).replace(BACK, e=>UNSUBST[e]) }