Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • alle html tags (<…> en </…>)

    • in typescript/javascript code: .replace(/<[^>]*>/g, '')

  • alle &nbsp; tags (non breaking space)

    • in typescript/javascript code: .replace(/&nbsp;/g, ' ')

  • alle &shy; tags (koppelteken)

    • in typescript/javascript code:.replace(/&shy;/g, '')

Code voorbeeld

Code Block
export function removeHtmlTags(value: string) {
  return value.replace(/<[^>]*>/g, '')
    .replace(/&nbsp;/g, ' ')
    .replace(/&shy;/g, '');
}