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 ">
Environment
| 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 1.3.26.0woody3 |
| 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">
<tr>
<td bgcolor="%WEBBGCOLOR%" rowspan="2" valign="top" width="1%">
+ <noautolink>
<a href="%WIKILOGOURL%"><img src="%WIKILOGOIMG%" border="0" alt="%WIKILOGOALT%" /></a>
+ </noautolink>
</td><td>
<a href="%SCRIPTURL%/view%SCRIPTSUFFIX%/%MAINWEB%/%HOMETOPIC%">%WIKITOOLNAME%</a>
&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