Skip to content

Comment API error while parsing JSON #372

@imscary

Description

@imscary

For example, if I want to parse the responeText of /api/comments/?reply_to=9006, it will fail:

Uncaught SyntaxError: Unexpected token / in JSON at position 87
    at JSON.parse (<anonymous>)
    at <anonymous>:1:13

The problem is at "urlized_text":"<a href="/h/matrix">#matrix</a>"
The " before /h/matrix cancels the " after href= causing an error. The best fix is to simply change the " in '

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions