2 gacjezv Dec 28, 2005 07:13

You cannot allow javascript as a valid url scheme, but you shouldn't be using it anyway as it breaks navigation for people with javascript disabled :-
<a href="http://www.yourdomain.com/pic.jpg" onclick='CaricaFoto(this.href);return false;">
You will need to add "onclick" to the allowable attributes for the a tag in conf/_formatting.php
¥
Thanks ¥åßßå
Will proceed with this. Cheers!
Hmmm... did this and still found that the error persisted... seems that the formation of the CaricaFoto string is invalid and does not pass the url pattern matching process... I tried onclick with a straight http:// reference and it worked fine..
Any ideas how to mod the _formatting.php to allow this pattern?
Error I get below:
Found invalid URL: URL «CaricaFoto(http://www.xyz.com/photo/123.jpg);return false;;» does not match url pattern!
your link should look like the one I posted above
<a href="http://www.xyz.com/photo/123.jpg" onclick="CaricaFoto( this.href );return false;">
¥
I'm getting a similar error in v0.9.1. I'm trying to save a post with the following link:
<a href="http://www.tournamentofroses.com/rosebowlgame/">Rose Bowl</a>
And I get the following error message:
Found invalid URL: URL not allowed
I'm not using any js with this link, just the URL itself.
I've tried a couple of variations on that URL, and have gotten the same error message each time. I saw this once before with another URL, but at the time I didn't think the problem was with b2e, so I didn't make a note of what the other URL was.
Any ideas on what's causing this?
I think the problem is, that <a> is not allowed in b2evo. You have to put him in the _format.php.
The first part of the _format.php (wich can be found in the config folder)is about the post. The second part of the _format.php is about the commant area.
What to do in the _format.php
Firts get <a> to be allowed.
Place:
'a' => E_Iinline,
in the "Array showing what tags are allowed and what their allowed subtags are".
Next you have to get the atributes to be allowed:
Place:
'a' => A_attrs.' href ',
in the "// Array showing allowed attributes for tags".
I hope this will work, maybe you have to put it between a <div> too (I had to do that with a <embed> tag)And can someone say to the guy if I'm saying the right thing (am using b2evo not so long myself)
good luck with it
This is probably not a matter of the <a> tag being not allowed, but the URL being on the antispam blacklist.
I don't have any trouble with the <a> tag, I've used it almost every single post I've made, and this is over three different versions of b2e. I've never had this problem before, and its only certain URLs, but I can't figure out why.
I had the same thought as blueyed, but tournamentofroses isn't listed on my antispam tab.
Enable $debug-mode in /conf/advanced.php ($debug = 1). You will get the blacklisted word/cause in the debuglog then..
keywords for searchers: antispam invalid url blacklist debug find.
I have discovered that the issue I have is with:
javascript:CaricaFoto('http://www.xyz.com/b2blogs/xyz.jpg') in the URL string.
I have edited _formatting.php and added javascript to $allowed_uri_scheme If I recall in versions previous to Phoenix this is all I had to do, and it was working with these versions.
The exact error is «javascript:CaricaFoto('http://www.xyz.com/b2blogs/xyz.jpg');» does not match url pattern!
Is there any other place I need to ammend to allow this style of HREF pattern?
Thanks in advance
gacjezv