It's not working because you're not asking $remove to remove
but either :
$+ $chr(38) $+ amp $+ $chr(59) $+ quot $+ $chr(59) $+
which is "
or
$+ $chr(38) $+ amp $+ $chr(59) $+ $chr(35) $+ 39 $+ $chr(59) $+
which is '
or
$+ $chr(38) $+ amp $+ $chr(59) $+ amp $+ $chr(59) $+
which is &
Of course none of this is present inside the variable, next time triple check what you are doing.
Also, you don't need $+ with $null value ($remove(text, $+ text1 $+ ) is just $remove(text,text1))