Recent Topics

1 Nov 21, 2005 04:51    

I searched for this error message on these forums but didn't find anything. So I'm asking for help. Error:


Cannot post, please correct these errors:
Tag a may not have attribute onclick


I am dropping a clickable video blog element into my post which adds the code below. I have changed out the editor module to TinyMCE to allow this (as per instructions on this forum which worked perfectly). I know that TinyMCE works for this because the online demo of TinyMCE on their site works when the object is dropped and after posting the picture is clickable.

I suspect that B2E is checking the post and not allowing things that it thinks are security problems. However, the only poster to this entire blog site is me and I need to post these. So, if it is true that this is being disabled for security reasons, how do I disable this check to allow the code. The object that I am dropping adds the following HTML:

<br><a href="#" onclick="window.open('http://progressive.playstream.com/seriousmagic/progressive/flvplayer.html?height=231&width=262&flvfile=Mark_Hotel3&username=markran2&skin=minihalo', 'PLAYERWINDOW', 'height=296,width=287'); return false;"><img src="http://progressive.playstream.com/markran2/progressive/Mark_Hotel3_240x180.jpg" align="left" border="0" hspace="10" vspace="2" width="240" height="180"/></a>

By the way, adding this HTML via a drag and drop works in TypePad, Blogger and MySpace.

Thanks in advance for any help you can offer!

--- Mark[/url]

2 Nov 21, 2005 08:31

I'll reply to my own question

It's in conf/_formatting.php
$use_html_checker = 1;

However it seems like the flag disables it for both posts and comments. I want to keep checking on comments but turn it off for posts (because I'm the only one posting). The actual parameters are set independantly for posts and comments. Trying to figure that out now...

EDITED:
My solution is here: http://forums.b2evolution.net/viewtopic.php?t=3807

--- Mark

3 May 14, 2006 00:24

If you dont want to turn off the html checker completely but allow certain elements you can edit the _formatting.php file in the /conf/ dir.

For instance you can allow onclick by editing what can define the <a> tag...

Line 240



	// 'a' => A_attrs.' charset type href hreflang rel rev shape coords',			// Strict
	'a' => A_attrs.' charset type href hreflang rel rev shape coords target',	// Transitional

Just add onclick to these lines like so...

Line 240



	// 'a' => A_attrs.' charset type href hreflang rel rev shape coords onclick',			// Strict
	'a' => A_attrs.' charset type href hreflang rel rev shape coords target onclick',	// Transitional

neat arrows.... well you get the idea.

4 Jun 17, 2007 00:37

Thanks Iceblood! I was having the same issue and your suggestion fixed me right up!


Form is loading...