This method was occasionally calling the innerText on node which would return undefined, so trim was called on an undefined method. Check it first
Mozilla is placing <br type='_moz'> that doesn't always get cleaned
Return the new node on changeTag