create new tag
, view all tags

Bug: Logo image ALT text is expanded into A tag, breaking IMG tag

The ALT text of the logo image in the upper left corner of the default layout is expanded before display. When that text contains the name of the current web (at least for an all-caps name), that name is expanded into an <A> tag. Since that <A> tag appears within the ALT attribute of an <IMG> tag, the IMG tag is broken and does not display correctly.

(In my case, since I don't currently have a valid image URL, the ALT text is displayed, but appears with "<a href=..." With a valid image URL, the tool tip would presumably display the same bad text.)

Test case

1. Create a web with an all-caps name.

2. Set WIKILOGOALT to text containing the all-caps web name.

(Try viewing a page in that web and check the tooltip text.)

3. Set WIKILOGOURL to an invalid URL (so the browser displays the ALT text in place of an image).

View a page in that web and see how the ALT text is distorted.

With Mozilla 1.5, a WIKILOGOALT value of "Need NCES image" displays as:

Need <a href=NCES image ">


TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Debian GNU/Linux 3.01r1 (woody)
Web server: Apache 1.3.26 (Debian package version
Perl version: 5.6.1 (Debian version 5.6.1-8.3)
Client OS: Debian Linux, Windows
Web Browser: Mozilla 1.5

-- DanielBarclay - 11 Nov 2003

Follow up

You probably have a topic called NCES; TWiki renders that as a link, even in an image alt tag.

Workaround: In the alt tag, write <nop>NCES.

Fix record

Enclose images in the templates and skins with noautolink tags:

*** ../../p/templates/twiki.tmpl        2003-03-21 21:48:43.000000000 -0800
--- twiki.tmpl  2003-11-23 08:56:05.000000000 -0800
*** 6,12 ****
--- 6,14 ----
  <table width="100%" border="0" cellpadding="3" cellspacing="0">
    <td bgcolor="%WEBBGCOLOR%" rowspan="2" valign="top" width="1%">
+    <noautolink>
     <a href="%WIKILOGOURL%"><img src="%WIKILOGOIMG%" border="0" alt="%WIKILOGOALT%" /></a>
+    </noautolink>
     &amp;gt; <a href="%SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/%HOMETOPIC%">%WEB%</a>

I also noticed that TWiki did not filer out the noautolink tags. This is fixed too.

Change is in TWikiAlphaRelease and at TWiki.org.

Note to skin developers: Update your skin's twiki.name.tmpl files.

-- PeterThoeny - 23 Nov 2003

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2003-11-23 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.