Page 1 of 1

'Editor - None' doesn't work in Joomla 1.6..?

Posted: Tue Aug 31, 2010 1:37 pm
by gardenbreeze
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

Re: 'Editor - None' doesn't work in Joomla 1.6..?

Posted: Tue Aug 31, 2010 2:44 pm
by stutteringp0et
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)

Re: 'Editor - None' doesn't work in Joomla 1.6..?

Posted: Tue Aug 31, 2010 10:33 pm
by gardenbreeze
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

Re: 'Editor - None' doesn't work in Joomla 1.6..?

Posted: Wed Sep 01, 2010 3:22 am
by stutteringp0et
Yes, filter tag should be filled with the tags used within the code you want to paste.

For example:

Code: Select all

<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.

Re: 'Editor - None' doesn't work in Joomla 1.6..?

Posted: Wed Sep 01, 2010 2:09 pm
by gardenbreeze
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>

Re: 'Editor - None' doesn't work in Joomla 1.6..?

Posted: Thu Sep 02, 2010 3:51 pm
by stutteringp0et
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.

Re: 'Editor - None' doesn't work in Joomla 1.6..?

Posted: Fri Feb 04, 2011 9:48 pm
by kwkness
still the same bug for me

setting the option to 'no filtering' worked for me

Re: 'Editor - None' doesn't work in Joomla 1.6..?

Posted: Wed May 04, 2011 2:07 pm
by atom
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