Problem with links

click in the links

This is fine

but this does not

the difference is only a character
inserts these characters% E2% 80% 8B in the second link

Here is the same
copy paste

what is the problem?

what's that have to do with mybb?
(01-07-2009, 11:35 PM)Proper Wrote: what's that have to do with mybb?

in other forums work fine the link
in mybb not
what do you mean, those are rapidshare links
He is right...that's odd...possibly a mybb bug.
It actually seems to be a wordwrap issue. Might have a look into it a bit more.
EDIT: Unlikely to be fixed without some major change to the wordwrap system. All I can suggest is turn off word wrapping / increase the wrap cutoff to fix the issue.
Zinga, can you explain what is going wrong?
(01-22-2009, 06:56 PM)Ryan Gordon Wrote: Zinga, can you explain what is going wrong?
The wordwrap function doesn't differentiate text inside a HTML attribute to text outside of a HTML tag. The wordwrap function is trying to wrap the long URL inside the <a href="<url>"> attribute.
This user has been denied support. This user has been denied support.
Even so, wordwrap should already recognize / and . as word delimiters so usually even very long URLs are safe because slash is already a delimiter as is dot:

There's no problem unless the URL actually contains a single folder/file that is fricking long without punctuation (>80 characters with default wordwrap setting). It's hard to find a real world example for that. Whoever creates such long URLs is asking for trouble.

EDIT: Code taken out, doesn't work this way.
Thanks for the suggested code, however as you said, there's no "easy" perfect solution anyway, and it's generally unlikely to get many URLs which exceed 80 characters without some non-word delimiter.

Unfortunately, your example doesn't appear to work here (I'm assuming "$0" should be "$0&#8203;​", or else no word-wrapping occurs at all) - specifying <.*?> as an alternative branch doesn't actually stop preg_replace from replacing inside tags.
echo preg_replace("#(?>(<.*?>|[^\s&/\"\\-\.\[\]]){10})#u", '$0 ', '<a href="asdfsadiufahsifdudhsaf">');
<a href="asdfsadiuf ahsifdudhs af">

Thanks for the suggestion nonetheless Toungue

Forum Jump:

Users browsing this thread: 1 Guest(s)