How to work only with CDATA in DOM?
I have to create a JS function which guarantees that there can be no text lines with only one word in them. This basically means that I have to replace the space between the last two words in every sentence to a non-breaking one with a simple regular expression.
To ensure that no tags would be altered (e.g. to prevent modifying text in alt or title attributes) the final regular expression should be quite complex.