lionleaf / lionleaf/dwitter

Comment API error while parsing JSON

Open
#372 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
803
Forks
68
PR merge metrics
No merged PRs in 30d

Description

For example, if I want to parse the responeText of [/api/comments/?reply_to=9006](https://www.dwitter.net/api/comments/?reply_to=9006), it will fail:
```
Uncaught SyntaxError: Unexpected token / in JSON at position 87
at JSON.parse ()
at :1:13
```
The problem is at `"urlized_text":"#matrix"`
The " before `/h/matrix` cancels the " after `href=` causing an error. The best fix is to simply change the `"` in `'`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by requesting /api/comments/?reply_to=9006 and inspecting the responseText around urlized_text. Trace where that API response is produced and verify that the returned content remains valid JSON while preserving the linked comment text; confirm by parsing the response successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, javascript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.