Jump to content
DavidAM

Web Link in Individual Narrative Not Working

Recommended Posts

I am trying to insert a link into a burial tag. I want the link to work when I run the Individual Narrative to an HTML file. According to the documentation, I should insert

[WEB:]http://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GSvcid=95138&GRid=13691159&;Find-A-Grave Memorial[:WEB]

to create a link. Unfortunately, this does not seem to work with the query string on the end of the link. The resulting link in the Individual Narrative report ends the HREF after the first "&". The remaining text is used as the display text for the hotlink. So it looks like this: GSvcid=95138&GRid=13691159&;Find-A-Grave Memorial, which does not work at all. I tried using the HTML tags

[HTML:]<A HREF="http://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GSvcid=95138&GRid=13691159&">Find-A-Grave Memorial</A>[:HTML]

to force it to work correctly thinking this was a bug. But this tag does not work at all. It causes the actual HTML code to display when the report is run (either to HTML or to the screen), like this: <A HREF="http://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GSvcid=95138&GRid=13691159&">Find-A-Grave Memorial</A>.

 

If I use the WEB tags and drop off the query string (or actually drop the second and subsequent parameters) it will work correctly, but then the link does not go to the correct page. Using the HTML tag does not work regardless of what I try. I haven't tried this with other reports since the Individual Narrative is the one I need for this particular case.

 

I am currently running: Gold Edition v 7.04.0000 on Windows XP. Has anyone else seen this problem, or does anyone have a solution?

Share this post


Link to post
Share on other sites

The problem is the ampersand. :yucky: In Hyper Text Markup Language the & is the escape character. After some testing I finally figured out that the & needs to be escaped in TMG using the \ backslash, which is the TMG escape character.

Try this:

[WEB:]http://www.findagrave.com/cgi-bin/fg.cgi?page=gr\&GSvcid=95138\&GRid=13691159\&;Find-A-Grave Memorial[:WEB]

Note the \ before each &In HTML to produce an ampersand the proper code is & but the added semi-colon causes other problems in the [WEB:][:WEB] wrapper and it does not appear that escaping them with a backslash works, FWIW I couldn't get the [html:][:HTML] wrapper to work at all either...

 

I'd highly recommend Second Site it creates really nice web pages with not much effort.

Edited by ggilbert1

Share this post


Link to post
Share on other sites

Yes, it appears that, since the output is HTML, the memo is processed for HTML special characters, before these two format codes are checked. Since an "&" is converted to "&" the semi-colon marks the end of the website address and the begining of the link text. This is not good. Since the "&"'s in the query-string (the part after the "?") should NOT be "HTML escaped". That is: www.abc.com?a=1&b=2 is not a correctly formatted URL (although it does seem to work in some cases). The choice of ";" (semi-colon) as the separator between the address and text is doubly unfortunate since the W3C specifications allow the ";" to be used instead of the "&" in a query-string.

 

I tried a couple of other reports and obtained the same result. While the [WEB] codes will work (as long as there is no query string or a single parameter query string) the

 codes do NOT WORK AT ALL.

 

So, at this point, I am dead in the water. I can not add the links that I would like. I guess the question now is, how do report this to technical support. The TMG help file leads to these forums for technical support, but I don't see any indicators on how to report a bug or contact tech support.

Share this post


Link to post
Share on other sites

First, I wanted to correct an earlier comment. According to the HTML standard, when an ampersand appears in an HTML statement, it should be converted to "&". That includes when it appears as part of a URL in an HREF element. So, this is correct:

 

href="http://www.example.com?a=1&b=2"

However, most browsers will allow you to enter it like this:

 

href="http://www.example.com?a=1&b=2"

Unfortunately, that doesn't help get around the issue. The TMG rule is that a semicolon is used to separate the URL from the link text (if link text is provided), and as someone else mentioned, it appears that the "&" is being converted to "&" before the scan for the semicolon is done. That causes the incorrect result where the URL parameters are considered part of the link text.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×