@tijsverkoyen: do you have an example of what you mean?

@siesqo: after this line, add 		$value = preg_replace('/&[a-z]+;/i', '-', $value);
This will get rid of any leftover html entities (e.g. &raquo;) that the original regex does not match

After that, and provided that @tijsverkoyen also +1s this change, it can be merged