DavidAM 0 Report post Posted July 27, 2009 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
ggilbert1 0 Report post Posted July 29, 2009 (edited) The problem is the ampersand. 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 July 29, 2009 by ggilbert1 Share this post Link to post Share on other sites
DavidAM 0 Report post Posted August 2, 2009 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
ggilbert1 0 Report post Posted August 3, 2009 The example I gave seems to work for me... See: http://gilbert-genealogy.info/tmg/test/jcmizzell0001.htm The Find-A-Grave Memorial link takes me to the John Calvin Mizzell page Share this post Link to post Share on other sites
John Cardinal 0 Report post Posted August 3, 2009 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