Question
· Nov 20, 2015

How do you to a lone ">" in an &html<> block?

I am using &html<> to output some CSS to my page (which is a class-based and not a tag-based page), and the selectors contain the '>' character which the compiler chokes on.  How can I escape the '>' so it still displays as such in the web page source but doesn't trip up the compiler?

This is for 2012.2 btw.

Discussion (8)0
Log in or sign up to continue

Note - I found a really cool feature in the latest version of Caché:

http://docs.intersystems.com/cache20152/csp/docbook/DocBook.UI.Page.cls?KEY=GCOS_embedded#GCOS_C4917

So I could use a marker of &html[<my text here>] and it should work because a single > will not a an ending bracket.  

However, I am currently stuck on Caché 2012.2.  Does anyone know a way to do this on an older version?

Thank you both!

Derek - Your second solution doesn't compile for some reason (that was my next try after I saw that &gt; didn't work).  Your first solution is what I had (temporarily) settled for but it put the > on a new line so it was really ugly in the source (and I wasn't sure if line breaks in CSS selectors was valid)

Fabian - your solution works very nicely, thank you!!