Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json invalide pour la liste des docs d'un cours #42

Closed
C4ptainCrunch opened this issue May 20, 2012 · 1 comment
Closed

Json invalide pour la liste des docs d'un cours #42

C4ptainCrunch opened this issue May 20, 2012 · 1 comment
Assignees
Labels
Milestone

Comments

@C4ptainCrunch
Copy link
Contributor

Le json pour la liste des docs d'un cours est invalide :

  1. Y'a un problème d'encodage : chrome détecte du iso latin 1 alors que c'est de l'utf-8 (suffit de changer les headers http normalement)
  2. Le champ "description" se termine parfois par \n (et je crois que json n'aime pas les caractères blancs)

Url : http://cours.cerkinfo.be/document/all/math-h-101
Browser : Chrome (et les autres ?)

@C4ptainCrunch
Copy link
Contributor Author

Solution ? replace \n by \\n
(cf http://stackoverflow.com/questions/395379/problem-when-retrieving-text-in-json-format-containing-line-breaks-with-jquery)

Suffisant ? Escape d'autres caractères aussi ? Oui : https://www.ietf.org/rfc/rfc4627

@ghost ghost assigned ekatsah May 20, 2012
@ekatsah ekatsah closed this as completed May 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants