[Map Module] links (URLs) and bbcodes in infowindows

galmoid

Joined: 2005-11-07
Posts: 364
Posted: Thu, 2006-03-23 23:18

We have a problem regarding the handling of bbcodes (other
than URLs) in the 'g' infowindow templates (and I suppose
any others that make use of the str_replace functions at
the top of the file). These functions handle the URLs fine,
which is what they were designed to do; but, other codes such
as end up becoming messed up. I expect this is becuase
the markup command (as in '$point.summary|markup') which is in
MapHeader.tpl comes after the infowindow stuff is processed.

I am unsure if this should be portrayed as a bug and posted at
SourceForge -or- rather, just open a discussion about just
having URLs in infowindows -always- open in a separate
window (as do the 'g' templates now). If the -always- route is
taken I would expect the code from the functions in the
infowindows could be moved to MapHeader and get run through
markup and solve the other bbcode problems.

For those that have never used the 'g' templates, the separate
window that is opened is reused if not closed (ie: multiple
windows are not opened).

By the way, as it is now, all occurrences of a ']' will be
replaced by a '>' regardless if it should or not.

What say you all?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2006-03-24 00:32

Personaly I don't like the other windows that get opened up.
But that is my opinion and I suspect others as well. I don't think we should take the option out to have links open in other windows. It should be a option for the user/admin.

We have to be carefull about what we put in the info window.

In the future (when Termite get the permissions done) it might be a unknown user that is puting that information in and this can become a security risk. Some form of sanitizing must be done on all fields that a user can enter stuff into.

Dave

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2006-03-24 20:04

There is many bugs related to BBcode in the code alltogether. I've seen a bunch of things not diaplying correctly. there might be a funciton in the CoreApi that takes care of that and would prevent us from re-inventing the wheel here.

I also think that this problem is just about everywhwere (routes, groups, infowindows)... anyways it needs some fixing :-)
-------------------------
The Termite :-)

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Fri, 2006-03-24 20:40
Termitenshort wrote:
...there might be a function in the CoreApi that takes care of that and would prevent us from re-inventing the wheel here...

I believe the function is 'markup' (I mentioned it above); but,
we would need to rethink how we do the stuff at the top of the
infowindow templates. We could just put more code there to
deal with them. str_replace would work just fine there for
the simple ones; but, there is img and list which would require
a little bit more.

Dave-
The infowindow templates display whatever is in the summary
and/or description. Since these accept bbcodes then I would
suppose we should deal with them. I whole heartedly agree that
choice (regarding everything everywhere) is essential.