Escaping hash (#) on reporting module groovy

(Samuel Mbugua) #1

I am designing a report renderer with anchor links like href="#home". Unfortunately # is a special character in groovy and it is removed from my rendered report. Escaping it with # throws an error "Unexpected character " while trying to use JS escape code \u0023 still have it removed from the rendered report.

(Burke Mamlin) #2

I’m assuming # isn’t decoded, so isn’t an option.

(Samuel Mbugua) #3

@burke, this doesnt work either as it is replaced with # on submit.

(Burke Mamlin) #4

Would it get decoded again during display? If so, then how about #? :slight_smile:

(Samuel Mbugua) #5

Thank Burke, I picked a flow. So if use &num ; and save the template without a preview its rendered well on running the report. If I edit it and save, the # is decoded to #. The same flow follows for #. (First save or preview, it becomes &num ; , second save or preview it becomes # and lost from the resultant report. )

I think the best solution would be support for escaping # with a slash like other special characters :slight_smile: Sam

(Samuel Mbugua) #6

So for now I will make sure before saving the template contains # and avoid preview. :slight_smile:. Thanks a million. Sam