YQL is instead returning a "messed up" value for the "html" key. The problem is due to the fact that YQL "correctly" tries to fix the value as if it was HTML because the response has an incorrect Content-Type set to text/html. The mess-up happens at the first unescaped ">" inside the onclick attribute, resulting in the following "interpretation" for the onclick:
and the mistaken site is a third party I have no relationship with,
and there is no way I can make them send a correct Content-Type in a reasonable amount of time,
and YQL is half correct (I understand that automatic correction may be useful for further processing by YQL but automatic correction is almost by definition what messes things up, unexpectedly like in this case, where wrong HTML is instead correctly rendered by a browser),
and I wanted to use YQL
a good solution would be to have YQL implement the possibility to configure the request URL so that we ALWAYS get the raw result, ignoring the Content-Type.