Render Image With Alt tag that has a single quote in it.
30 views
Skip to first unread message
Ettienne Gous
unread,
Jan 26, 2015, 7:58:37 PM1/26/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to glass...@googlegroups.com
Currently the render image helper method outputs all tags with single quotes as attribute value delimiters.
When an ALT tag has a single quote in it the tag is misinterpreted. (See output below; The issue is with "ACME's" part)
Below is a sample of my render image call I make and the output rendered.
Code
@(new HtmlString(@GlassHtml.RenderImage(@fpii, x => x.Image, new { CLASS = "img-responsive" }, true)))
Output
<img src='/~/media/Upload/YCCImage.ashx' class='img-responsive' alt='We are ACME'sChoice' />
Is there a way to have the image output with double quotes to enclose the attributes?