I have a site where users can fill out reports. The admins have the ability to control the questions. So, I'm using GetSafeHTML() when I show the questions because there are some questions that have bulletted lists and EncodeForHTML when displaying the answers. That all works fine when displaying the questions and answers to the screen. However, the user also has the option to save the report as a pdf. I'm using cfdocument to create the pdf. My problem is that anything with GetSafeHTML is showing the html (ie <ul><li>, etc.) for the list instead of just displaying the bulleted list.
Anyone else having similar problems? Any thoughts on work arounds? I am thinking of using IsSafeHTML and only displaying if it is safe and no longer using GetSafeHTML to display. Anyone deal with this differently?
Turned out to be a versioning problem...
The site is running on CF11 and I'm developing on CF2016, which is what they are moving to next month.
On CF11, getSafeHTML() doesn't work with cfdocument/pdf. Canonicalize() does work on both cf11 and cf2016 when outputting html, so that's what I'm using in this case. On CF2016, getSafeHTML() works fine with cfdocument/pdf.
I didn't try cfpdf.
Glad you got it working. And thank you for marking my answer correct. I do appreciate it.
^ _ ^