Fix bug in _getChildTextLength

A lot white space is attached as tail at invisible element, strip them.