I'm using Umbraco 7.2 razor, and I'm trying to use imagegen with an opengraph tag, but the querystring ampersand (eg. "&width=380") always gets converted into '&' which ends up breaking imagegen and loading the full size image. Am I missing something simple to fix this problem? This is my code:
Ampersand always getting encoded in razor
I'm using Umbraco 7.2 razor, and I'm trying to use imagegen with an opengraph tag, but the querystring ampersand (eg. "&width=380") always gets converted into '&' which ends up breaking imagegen and loading the full size image. Am I missing something simple to fix this problem? This is my code:
Hi Jonok,
Correct me if I'm wrong but isn't your code outputting "& amp;"? Can't you just use "&" instead?
I guess if that doesn't work, you could always use Html.Raw() in your content attribute:
Hope that helps.
Thanks, Dan.
Wow - I've been working too long. You're right - I was already using & in the razor. What an idiot :)
is working on a reply...