The Joomla! Forum ™



Forum rules


Please use the Forum Post Assistant to give your server setting details which are necessary to determine the problem.



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
PostPosted: Tue Aug 31, 2010 1:37 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 31, 2010 2:45 am
Posts: 3
I want to add 'add to cart' paypal button. I created button, copied and pasted html code created by paypal. 'Editor - None' was selected for a Super User (me), that means that my html code will not be changed when file is saved, but editor still re-formats some HTML when a file is saved. Help please...I use Joomla 1.6


Top
 Profile  
 
PostPosted: Tue Aug 31, 2010 2:44 pm 
User avatar
Joomla! Ace
Joomla! Ace
Online

Joined: Sat Oct 28, 2006 11:16 pm
Posts: 1252
Location: Texas
Selecting "Editor - None" provides no editor in Beta 8. Maybe you're running into the filter restrictions. You can't (necessarily) paste just any-old-code into an article. To prevent people from injecting malicious scripts into your code, there is a filter in place.

The default blacklist contains the following tags:
'applet', 'body', 'bgsound', 'base', 'basefont', 'embed', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'object', 'script', 'style', 'title', 'xml'

And the following attributes:
'action', 'background', 'codebase', 'dynsrc', 'lowsrc'

If your paypal code contains any of these, it will be stripped.

You can modify the filter to include a whitelist of allowable tags and attributes. Take a look at Content > Article Manager >> Options > Text Filters (tab)

_________________
My extensions: http://extensions.joomla.org/extensions/owner/stutteringp0et
Honk if this signature offends you.


Top
 Profile  
 
PostPosted: Tue Aug 31, 2010 10:33 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 31, 2010 2:45 am
Posts: 3
Hi, Thank you for replay, but I tried and did not work. Could you please check if I have done it correctly. I performed the following:
1. Article manager->options-> text fiters
2. selected admin level (my level)
3. Changed filer type to White list
4. did not put anything in "filer tag" Should I?
5. put "action" into "filter attribute"
6. saved

Thank I went to the article and added html code from Paypal. After saving the article, HTML for Paypal add to cart was changed by Joomla (1.6). What is I am doing wrong?

Thank you for any feedbacks


Top
 Profile  
 
PostPosted: Wed Sep 01, 2010 3:22 am 
User avatar
Joomla! Ace
Joomla! Ace
Online

Joined: Sat Oct 28, 2006 11:16 pm
Posts: 1252
Location: Texas
Yes, filter tag should be filled with the tags used within the code you want to paste.

For example:
Code:
<script type="text/javascript">alert('hello');</script>
<div><span>hello</span></div>

The tags here are 'script', 'div', and 'span', so filter-tag should be: script,div,span

Of course, you'll need to examine the code you're inserting and determine the tags you're inserting. Take note of them, and insert them into the filter-tag field separated by commas.

_________________
My extensions: http://extensions.joomla.org/extensions/owner/stutteringp0et
Honk if this signature offends you.


Top
 Profile  
 
PostPosted: Wed Sep 01, 2010 2:09 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Aug 31, 2010 2:45 am
Posts: 3
Thanks for replay, but It did not help, or maybe my knowledge is not up to this level, but it seems to be a very simple task. I am almost give up on Joomla 1.6, so many problem..


Below is the sample I was trying to add to my artice. What tag and attributes should I defined in whitelist. Thanks

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="hosted_button_id" value="TYN43NLY68PRC">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>


Top
 Profile  
 
PostPosted: Thu Sep 02, 2010 3:51 pm 
User avatar
Joomla! Ace
Joomla! Ace
Online

Joined: Sat Oct 28, 2006 11:16 pm
Posts: 1252
Location: Texas
OK, when I paste that code into an article, the only portions that are altered are:

1. the action attribute is stripped - this occurs regardless of the whitelist setting.
2. self closing tags are given the appropriate "/>" ending - this is a good thing.

You'll probably want to file a bug in the tracker for this one.

_________________
My extensions: http://extensions.joomla.org/extensions/owner/stutteringp0et
Honk if this signature offends you.


Top
 Profile  
 
PostPosted: Fri Feb 04, 2011 9:48 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Jan 27, 2011 10:30 pm
Posts: 3
still the same bug for me

setting the option to 'no filtering' worked for me


Top
 Profile  
 
PostPosted: Wed May 04, 2011 2:07 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Mon Sep 19, 2005 3:54 am
Posts: 42
kwkness wrote:
still the same bug for me

setting the option to 'no filtering' worked for me



Yes, this worked for me too. Joomla 1.6.x


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 



Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group