Currently I have a link definition that looks like this
@(new HtmlString(GlassHtml.RenderLink(Model, x => x.Link_URL, new Glass.Mapper.Sc.RenderField.LinkParameters { Class = Model.Link_Class + " btn-uppercase" }, true, contents: Model.Link_Label)))
It works as expected on normal page view
Working<a
parameters="System.Collections.Specialized.NameValueCollection" text=""
class="btn btn-k1 btn-uppercase" title="" target=""
href="/Regions/Africa-and-Middle-East">Explore Tour</a>
However when it goes over to page editor I get the following
Broken<a class="btn+btn-k1+btn-uppercase scEnabledChrome" parameters="System.Collections.Specialized.NameValueCollection" href="/Regions/Africa-and-Middle-East" sc-part-of="field">Explore Tour</a>
The class attribute is encoded with + that replace the spaces and breaks the button styling.
I have tried the following
- Remove the wrapping @HtmlString
- Tried replacing the current implementation with a BeginRenderLink block to see if it makes any difference
Both of these didnt seem to help.
Any other suggestions would be greatly appreciated.