Use selection text instead of html

It fixes many anoyances and reduces possible crashes

for example previously the "word": <li><strong>Memory
would crash String.prototype.repeat because pivot would generate a negative index since the word is too long.