-1

I have a paragraph that is injected with an annoying &#8203 unicode character at the beginning of paragraph tags. (it's because of a Microsoft SharePoint CMS bug)

Using javascript, how would I write an if statement that searches if it exists and removes it? It is always the first character in the paragraph.

knox-flaneur
  • 149
  • 1
  • 1
  • 15
  • Check this one: https://stackoverflow.com/questions/24205193/javascript-remove-zero-width-space-unicode-8203-from-string – U Rogel Dec 01 '17 at 22:02

1 Answers1

0

The following removes all instances of that character (U+200B ZERO WIDTH SPACE) from a string:

s = s.replace(/\u200B/g, "");

Keep in mind that 820310 = 200B16.

ikegami
  • 367,544
  • 15
  • 269
  • 518