Re:A story about <input>
by LukeShu on Thursday October 22, 2015 @02:56PM
(#10434176)
Hey HN staff, there's a bug here: body shows fine, but the title renders as "A story about <input>"
[ Parent
| on HN ]
I'm seeing this as well. The served html says
<title>A story about &lt;input&gt; | Hacker News</title>
It looks like it got double encoded.
Re:A story about <input>
by nathancahill on Thursday October 22, 2015 @04:32PM
(#10434848)
Funny, my HTML based HN app on iOS actually rendered[0] an input field in the title. Disappeared after a second. No one submit titles with <script>alert()</script> please!
It looks like the title in the API is encoded correctly[1].
[0] http://i.imgur.com/CDnwDZJ.jpg
[1] https://hacker-news.firebaseio.com/v0/item/10433793.json?pri...
Re:A story about <input>
by scintill76 on Thursday October 22, 2015 @09:01PM
(#10436222)
The API is returning "title" : "A story about <input>" for me. I don't consider that correct encoding, as "<" is not a special escape sequence in JSON, and expecting API consumers to either blindly trust you did their escaping for them, or HTML-decode JSON strings to use in another context, is silly. It is probably another symptom of something HTML-escaping the title when it shouldn't be.
Re:A story about <input>
by nathancahill on Friday October 23, 2015 @11:27AM
(#10439182)
Yes, you're right.
CommaFeed has similar problem.
Same issue on Android: http://i.imgur.com/FKPvJsq.png
Time to avoid /newest.