1 tgagne Apr 26, 2006 06:37
3 tgagne Apr 26, 2006 14:16
But the $baseurl must be one or the other, too. No? If I'm going to modify the code I may make it so either a special URI like REMOVEME: gets removed so a relative URL can work, or get rid of URI checking.
It's important to figure out how often the URI is validated. Only when it's changed or whenever anything on its page changes. Hmm.
4 yabba Apr 26, 2006 14:45
You could just replace the http://site with nothing ?
¥
5 tgagne Apr 26, 2006 16:14
It could be replaced with nothing, but it'll end-up in the database with nothing (correctly). If I ever edit the post again and change something /other/ than the link, it will complain about the URI again, requiring me to add http:/site again before saving.
I'm curious why I should really care about a malformed URI. Nothing breaks if the URI is goofed up. In fact, insisting on a URI (valid or not) prohibits relative URLs as well as URIs that weren't anticipated when the software was written.
True, adding new URIs is as simple as editing conf/_formatting.php, but wouldn't it be better to not worry about them at all?
6 yabba Apr 26, 2006 16:29
I'm sorry, you misunderstood me, the post goes into the db as http://site (and stays like that in edit etc), it just gets changed before it's rendered to the screen.
¥
7 tgagne Apr 26, 2006 18:42
OK. If it's only changed before rendering then it would be cool. Where did you make that change?
8 yabba Apr 26, 2006 23:29
ok, this is untested (I use a renderer plugin), but, in your skin find this bit and add the red bit :-
$Item->content = str_replace( 'http://site', '', $Item->content);
$Item->content();
ish :p
¥
Here's what I do, I have a simple str_replace for http://site which gets translated into $baseurl. This allows me to post relative links and get past the checker ;)
¥