Ticket #1941 (closed feature request)
Add htmlAttr to Text.XHtml
| Reported by: | dsf | Owned by: | bjorn@… |
|---|---|---|---|
| Priority: | normal | Milestone: | Not GHC |
| Component: | libraries (other) | Version: | 6.6.1 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
It is necessary to allow HTML primitive characters such as "×" in string attributes, e.g.
<input type="image" src="delete.gif" alt="×" name=...>
However, passing "×" to strAttr results in an encoded string "&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")]
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

