Fix decoding charset parameter

To avoid a libxml bug/limitation, we were already stripping the charset
parameter, but we were not considering the single quote as valid
delimiter.