[GH-ISSUE #25] JSON.parse fails on special invisible characters #23

Closed
opened 2026-03-04 12:10:17 +03:00 by kerem · 2 comments
Owner

Originally created by @helllamer on GitHub (Jan 3, 2024).
Original GitHub issue: https://github.com/4IceG/luci-app-sms-tool/issues/25

The problem:

  • Sms messages counter is visible
  • No sms messages displayed in table bottom.
  • See screenshot:
  • Look at mouse pointer (bottom right) -- \u0011 character in .[0].sender

Снимок экрана от 2024-01-03 13-30-16

Steps to reproduce:

  • Buggy SMS message received from operator with garbage inside "sender" field:
    Снимок экрана от 2024-01-03 13-20-58
    Снимок экрана от 2024-01-03 13-36-13

Снимок экрана от 2024-01-03 13-24-47

In my example, there are \u0011 inside sender field, so browser failed to JSON.parse().

Looks like, related problem in SO https://stackoverflow.com/questions/28008852/json-parse-failing-on-valid-json-have-escaped-control-characters-if

Originally created by @helllamer on GitHub (Jan 3, 2024). Original GitHub issue: https://github.com/4IceG/luci-app-sms-tool/issues/25 The problem: - Sms messages counter is visible - No sms messages displayed in table bottom. - See screenshot: - Look at mouse pointer (bottom right) -- `\u0011` character in `.[0].sender` ![Снимок экрана от 2024-01-03 13-30-16](https://github.com/4IceG/luci-app-sms-tool/assets/681744/f7101ca3-8f2f-491d-92b6-fdd95d836b3d) Steps to reproduce: - Buggy SMS message received from operator with garbage inside "sender" field: ![Снимок экрана от 2024-01-03 13-20-58](https://github.com/4IceG/luci-app-sms-tool/assets/681744/84e168f8-6187-4632-9860-7e6eb6d988aa) ![Снимок экрана от 2024-01-03 13-36-13](https://github.com/4IceG/luci-app-sms-tool/assets/681744/09b3cfaf-3078-4daf-ac83-cedc93be34bb) ![Снимок экрана от 2024-01-03 13-24-47](https://github.com/4IceG/luci-app-sms-tool/assets/681744/2e5b82b5-67ec-408b-9017-79e0b6edca48) In my example, there are `\u0011` inside `sender` field, so browser failed to `JSON.parse()`. Looks like, related problem in SO https://stackoverflow.com/questions/28008852/json-parse-failing-on-valid-json-have-escaped-control-characters-if
kerem closed this issue 2026-03-04 12:10:17 +03:00
Author
Owner

@4IceG commented on GitHub (Jan 3, 2024):

Hi @helllamer ,

Problem is known https://github.com/4IceG/luci-app-sms-tool-js/issues/9 and should be solved.

<!-- gh-comment-id:1875166798 --> @4IceG commented on GitHub (Jan 3, 2024): Hi @helllamer , Problem is known https://github.com/4IceG/luci-app-sms-tool-js/issues/9 and should be solved.
Author
Owner

@helllamer commented on GitHub (Jan 3, 2024):

Closing as duplicate of #9

<!-- gh-comment-id:1875169761 --> @helllamer commented on GitHub (Jan 3, 2024): Closing as duplicate of #9
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/luci-app-sms-tool#23
No description provided.