fix escaping of double quote markup in legacy up_json_encode function

the old function was not matching double quote characters and thus did not escape them in the resulting json

if this code came from an external source that source should be notified that their solution needs this update.