[GHC] #1941: Add htmlAttr to Text.XHtml

GHC trac at galois.com
Wed Nov 28 07:45:26 EST 2007


#1941: Add htmlAttr to Text.XHtml
-------------------------------+--------------------------------------------
 Reporter:  dsf                |          Owner:         
     Type:  feature request    |         Status:  new    
 Priority:  normal             |      Milestone:         
Component:  libraries (other)  |        Version:  6.6.1  
 Severity:  normal             |       Keywords:         
 Testcase:                     |   Architecture:  Unknown
       Os:  Unknown            |  
-------------------------------+--------------------------------------------
 It is necessary to allow HTML primitive characters such as "×" in
 string attributes, e.g.

  <input type="image" src="delete.gif" alt="&times;" name=...>

 However, passing "&times;" to strAttr results in an encoded string
 "&amp;times;", which doesn't
 render the nice little x we need.  Attached is a patch to add an htmlAttr
 function so we can say

  input ! [strAttr "type" "image", strAttr "src" "delete.gif", htmlAttr
 "alt" (primHtmlChar "times")]

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1941>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list