X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Can you not put <script> in category descriptions??? (https://forum.x-cart.com/showthread.php?t=54413)

FMF 06-29-2010 05:20 PM

Can you not put <script> in category descriptions???
 
I am trying to put my Adsense for Search code in one of my category descriptions
looks like this:
HTML Code:


<form action="http://farmmanualsfast.com/Search1"  id="cse-search-box">
  <div>
    <input type="hidden" name="cx"  value="partner-pub-7968851057197054:xks3sm-p654" />
    <input type="hidden" name="cof" value="FORID:11" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
    <input type="text" name="q" size="31" />
    <input type="submit" name="sa" value="Search" />
  </div>
</form>
<script type="text/javascript"  src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>


For some reason it's not working every time I try to save it the page reload and deletes the whole description. The code works for static pages, so I'm not sure why it wouldn't work for category's, it uses the same HTML editor. I have tried Chrome and Firefox, and tried the other HTML editors nothing works.

Any advice?

Thanks,
Tyler

geckoday 06-30-2010 06:14 AM

Re: Can you not put <script> in category descriptions???
 
No, the X-Cart code doesn't allow <script> tags in category descriptions. You can change that by adding:

define('USE_TRUSTED_SCRIPT_VARS',1);

at the beginning of admin/category_modify.php

FMF 06-30-2010 07:02 AM

Re: Can you not put <script> in category descriptions???
 
Thank you geckoday, exactly what I was looking for.


All times are GMT -8. The time now is 01:22 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.