Commits

Anonymous committed e3eda3d

Fix external link icon in IE/Win when the link text spans multiple lines. Closes #937.

Comments (0)

Files changed (2)

htdocs/css/trac.css

 }
 
 @media screen {
- a.ext-link {
-  background: url(../extlink.gif) no-repeat 0 58%;
+ a.ext-link .icon {
+  background: url(../extlink.gif) left center no-repeat;
   padding-left: 16px;
  }
- * html a.ext-link { background-position: 0 .35em } /* IE hack, see #937 */
+ * html a.ext-link .icon { display: inline-block; }
 }
 
 /* Forms */

trac/wiki/formatter.py

         if Formatter.img_re.search(url) and self.flavor != 'oneliner':
             return '<img src="%s" alt="%s" />' % (url, title or text)
         if not url.startswith(self._local):
-            return '<a class="ext-link" href="%s"%s>%s</a>' \
-                   % (url, title_attr, text)
+            return '<a class="ext-link" href="%s"%s><span class="icon">' \
+                   '</span>%s</a>' % (url, title_attr, text)
         else:
             return '<a href="%s"%s>%s</a>' % (url, title_attr, text)