Feed burner changed their blog service return results that it returns blocks of javascript similar to:
document.write(\"\\x3cdiv class\\x3d\\x22feed
Those look like ASCII values, encoded in hex. You could traverse the string, and whenever you find a \x
followed by two hexadecimal digits (0-9,a-f), replace it with the corresponding ASCII character. If the string is long, it would be faster to save the result incrementally to a StringBuilder
instead of using String.Replace()
.
I don't know the encoding specification, but there might be more rules to follow (for example, if \\
is an escape character for a literal \
).