src/plugins/NarrativeWeb.py: Fix 0000954: e-mail address causes Narrative Web plugin to generate bad links

svn: r8274
This commit is contained in:
Brian Matherly 2007-03-06 04:30:22 +00:00
parent 2ca305b204
commit a4f28f1a16
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2007-03-05 Brian Matherly <brian@gramps-project.org>
* src/plugins/NarrativeWeb.py: Fix 0000954: e-mail address causes Narrative
Web plugin to generate bad links
2007-03-05 Don Allingham <don@gramps-project.org>
* src/ViewManager.py: support for close button on filter sidebar
* src/DisplayModels/_BaseModel.py: support for marker coloring

View File

@ -459,7 +459,14 @@ class BasePage:
if not descr:
descr = uri
of.write('<tr><td class="field">%d.</td>' % index)
of.write('<td class="data"><a href="%s">%s</a>' % (uri,descr))
if url.get_type() == RelLib.UrlType.EMAIL and not uri.startswith("mailto:"):
of.write('<td class="data"><a href="mailto:%s">%s</a>' % (uri,descr))
elif url.get_type() == RelLib.UrlType.WEB_HOME and not uri.startswith("http://"):
of.write('<td class="data"><a href="http://%s">%s</a>' % (uri,descr))
elif url.get_type() == RelLib.UrlType.WEB_FTP and not uri.startswith("ftp://"):
of.write('<td class="data"><a href="ftp://%s">%s</a>' % (uri,descr))
else:
of.write('<td class="data"><a href="%s">%s</a>' % (uri,descr))
of.write('</td></tr>\n')
index = index + 1
of.write('</table>\n')