How to replace all periods in a string that aren't in an html tag?

后端 未结 1 350
梦如初夏
梦如初夏 2021-01-29 10:43

I need to replace all periods in a user submitted paragraph of text that will most likely be copy and pasted from a microsoft word document so the text will have formatting on i

相关标签:
1条回答
  • 2021-01-29 11:27

    Use this answer to find text nodes, then do the replace on them.

    If you have it as a string, convert into document fragment first.

    0 讨论(0)
提交回复
热议问题