Community Forums

ATutor Bug Reports

html tags being converted to entities in the DB


You must be signed-in to post.

AuthorSubject
 
Page: 1
chipwiegand
62201745257PM.png
Subject: html tags being converted to entities in the DBQuote this post in your reply
I create a question for a quiz. If I use html tags I can use the visual editor, or not, there is no difference in the results saved into the database. When the question is saved the resulting question in the database has all html converted to entities. Problem is that when loading the quiz, or previewing the question, all those entities are shown on the screen to the end-user. I have to go into the database, in phpMyAdmin, and manually edit all the entities, changing them back to regular html tags. Then they are displayed correctly, until I edit the question. Then it's back to editing all the entities, again. This is very time consuming and annoying.

Am I the only person in the world that this is happening to? I don't see anyone else mentioning similar problems.

If you are asking for help, provide lots of detail so problems can be reproduced.

Things to describe:
ATutor Version: 2.2.2
PHP Version: 5.4.45
MySQL Version: 5.6.35-cll-lve
OS: Linux 2.6.32-673.26.1.lve1.4.27.el6.x86_64
PATCHES: All
DESKTOP OS: Win8.1 fully updated
Posted: 2017-06-02 17:53:57
greg

Avatar for greg
Subject: Re: html tags being converted to entities in the DBQuote this post in your reply
Here are a few github diffs that might help.
https://github.com/atutor/ATutor/commit/56741876ec6abfb8a3ca4dd72e68f20a63d0012a
https://github.com/atutor/ATutor/commit/7db187cd3e73531cc49ee659d32fc79239144064
https://github.com/atutor/ATutor/commit/6b35d060d4e5c93613e8867b948e9c27c76c28b3

These fixes and others will come out in 2.2.3.

In 2.2.2, as a security update, any HTML content going into the database is converted to entities with htmlspecialchars(). There were a few places missed with htmlspecialchars_decode() decoding the content when it get displayed.

No patch for this, unfortunately.
Posted: 2017-06-02 18:35:29
chipwiegand
Subject: Re: html tags being converted to entities in the DBQuote this post in your reply
Ok, thanks for the reply. As for the diffs, I'm not sure what that is all about, should I modify my atutor files by copy/paste the diff's code into my installation?
And, when will 2.2.3 come out?
Posted: 2017-06-03 16:21:19
greg

Avatar for greg
Subject: Re: html tags being converted to entities in the DBQuote this post in your reply
Applying the changes shown in the diffs, by editing the files.

Typically, adding htmlspecialchars_decode() where content is being output.

It'll probably be early October-ish for the 3.2.3 release. No set date yet.
Posted: 2017-06-05 08:52:21
 
Page: 1

You must be signed-in to post.

Related Articles