Community Forums

ATutor Bug Reports

Import file with styles in head (Scripts/CSS)

Page: 1
Subject: Import file with styles in head (Scripts/CSS)Quote this post in your reply
I created a page with styles added in the "Scripts/CSS" box in editing mode. The styles contain "%" symbols.
After exporting this page and trying to import it again using the "Import/export" option I noticed that the page was not imported.

In the PHP log I got an error of this type:

PHP Stack trace:
1. {main}() C:\xampp\htdocs\ATutor222sept\mods\_core\imscp\ims_import.php:0
2. queryDB() C:\xampp\htdocs\ATutor222sept\mods\_core\imscp\ims_import.php:1193
3. execute_sql() C:\xampp\htdocs\ATutor222sept\include\lib\
4. mysqli->query() C:\xampp\htdocs\ATutor222sept\include\lib\

In the source code I realized that in the INSERT SQL in the "mods/_core/imscp/ims_import.php" the $head variable did not have the escapeSQLValue().

After adding the escapeSQLValue($head) I could import the page normally.
Posted: 2016-09-19 11:25:29

Avatar for greg
Subject: Re: Import file with styles in head (Scripts/CSS)Quote this post in your reply
Try using two percent signs (%%) wherever one would normally appear.
Posted: 2016-09-19 13:11:33
Page: 1

You must be signed-in to post.

Related Articles