ape_ijson my $escaped_js = escape_ijson($raw_js); JavaScript-escapes the input string except for the apostrophe and returns it, so it can be used within a JSON element. =cut sub escape_ijson {