How To Replace All Periods In A String That Aren't In An Html Tag?
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 it.
Solution 1:
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.
Post a Comment for "How To Replace All Periods In A String That Aren't In An Html Tag?"