Page 1 of 1
HTML on Information Pages
Posted: Mon Jan 19, 2015 10:36 pm
by BeerinaBottle
I find that using HTML or a javascript snippet within the information pages does not work. For instance, just putting a simple html table into a page, when viewing this all the formatting is lost and if I go back to the code it has been corrupted. Is there a reason / cure for this?
Re: HTML on Information Pages
Posted: Mon Jan 19, 2015 11:03 pm
by Cue4cheap
Have you tried to enter it in 'source' mode?
Re: HTML on Information Pages
Posted: Tue Jan 20, 2015 12:33 am
by BeerinaBottle
Yes, it looks fine to begin with, but as I said, when I save and then go back to the code it has been corrupted.
Re: HTML on Information Pages
Posted: Tue Jan 20, 2015 9:10 am
by onlinemarketer
paste/screenshot an example of the corruption
Re: HTML on Information Pages
Posted: Fri Jan 23, 2015 2:44 am
by BeerinaBottle
onlinemarketer wrote:paste/screenshot an example of the corruption
Once I have entered my HTML, whether this be on an 'Information' page or within an HTML Content Mod, after saving the work and viewing it, it is corrupted. If I go back to view the code this:
<table align="left" border="0" cellpadding="10" cellspacing="1" style="width: 100%;">
<tbody>
<tr>
<td align="center"><a href="
https://www.facebook.com/beersinabottle#" target="_blank"><img alt="Facebook Page" src="
http://www.beerinabottle.co.uk/image/da ... cebook.png" style="width: 70px; height: 52px;" /></a></td>
<td align="center"><a href="
https://twitter.com/beerinabottle" target="_blank"><img alt="Foolow us on Twitter" src="
http://www.beerinabottle.co.uk/image/da ... witter.png" style="width: 70px; height: 52px;" /></a></td>
</tr>
</tbody>
</table>
Ends up as this:
<table style="\"width:" 100%;\"="" align="\"left\"" border="\"0\"" cellpadding="\"10\"" cellspacing="\"1\"">
<tbody>
<tr>
<td align="\"center\""><a href="\"
https://www.facebook.com/beersinabottle#\"" target="\"_blank\""><img alt="\"Facebook" page\"="" src="\"
http://www.beerinabottle.co.uk/image/da ... cebook.png\"" style="\"width:" 70px;="" height:="" 52px;\"=""></a></td>
<td align="\"center\""><a href="\"
https://twitter.com/beerinabottle\"" target="\"_blank\""><img alt="\"Foolow" us="" on="" twitter\"="" src="\"
http://www.beerinabottle.co.uk/image/da ... witter.png\"" style="\"width:" 70px;="" height:="" 52px;\"=""></a></td>
</tr>
</tbody>
</table>
Re: HTML on Information Pages
Posted: Fri Jan 23, 2015 4:01 am
by onlinemarketer
Looks like all your speech marks are having a slash added - this is normally a server/htaccess issue.
Does the same slashes appear if you use a speech mark on your product title?
Re: HTML on Information Pages
Posted: Fri Jan 23, 2015 5:03 pm
by pablopancho
This is probably a magic quotes problem as in this topic:
http://forum.opencart.com/viewtopic.php?f=191&t=136206
Long story short: you need to edit .htaccess file and make sure that the following lines are there and they are uncommented:
Code: Select all
php_flag magic_quotes_gpc Off
php_value magic_quotes_gpc Off
Re: HTML on Information Pages
Posted: Fri Jan 23, 2015 10:30 pm
by BeerinaBottle
Thanks for the suggestion, but when I made this change to .htaccess the site was no longer available, pages just came up as 404 errors.
Re: HTML on Information Pages
Posted: Sat Jan 24, 2015 12:08 am
by pablopancho
Sorry to hear that.

I am a bit out of my depth here but there is also a setting in php.ini regarding magic quotes.
Also, from what I know this issue is a problem in older versions of php and updating your server to the recent version could help. But sometimes we have no control over our hosting so this may be impossible.
As I mentioned in the linked thread, the temporary solution is to avoid putting quotes in source code and deleting them each time you edit content. It is very inconvenient and time consuming though.
Sorry I can't give more solutions

Re: HTML on Information Pages
Posted: Sun Jan 25, 2015 9:13 pm
by BeerinaBottle
This issue has now been resolved. After contacting my server hosts they turned off 'magic quotes' for me and that did the trick.