bbcode module's automatic url converting feature converts

<a href="http://some.host/some/very/long/path/file">http://some.host/some/very/...</a>

into

<a href="http://some.host/some/very/long/path/file"><a href="http://some.host/some/very/...">http://some.host/some/very/...</a></a>

after commit #28728. There's no problem when the bbcode is used as a separate input format with Line break converter only, but in my favorite site default input format is configured as "HTML filter => urlfilter => bbcode". In that setting, urlfilter module converts 'lazy' url string into an anchor tag with a shortened link text, and then bbcode converts the shortened text again to produce a nested anchor tag with an invalid href value.

I think there would be several resolutions for the problem:

  • expanding bbcode module to include the url shortening feature, or
  • allowing admin to disable the automatic url converting feature, or
  • canceling commit #28728. (Is the "<" really needed in the regexp??)

Comments

naudefj’s picture

Do I understand this correctly: both urlfilter and bbcode converts the URL to a link - thus the mess.

If this is true, why don't you disable the urlfilter. Does it do stuff that bbcode cannot do?

naudefj’s picture

Please ignore the above comment - I now understand what urlfilter does.

The best solution would we to allow admins to disable the automatic url converting feature. I will start working on it immediately.

naudefj’s picture

Assigned: Unassigned » naudefj
Status: Active » Fixed

Solution committed to CVS.

Anonymous’s picture

Status: Fixed » Closed (fixed)