문제

I'm currently working through several forms with outputs to the user and I've successfully applied the #esapiEncoder.encodeForHTML()# without issue thus far but I'm thrown as to whether this is the correct way of typing out an encode when DecimalFormat is part of it.

#esapiEncoder.encodeForHTML(DecimalFormat(hrsTotalLeave))#

Would that be the correct method? Or is it:

#DecimalFomat(esapiEncoder.encodeForHTML(hrsTotalleave))#

This page is using ColdFusion if that helps at all.

도움이 되었습니까?

해결책

I believe that you want to encode your values at the outermost level, so #esapiEncoder.encodeForHTML(DecimalFormat(hrsTotalLeave))# would be the way to go.

Using your second example and attempting to use format functions on encoded strings will potentially lead to issues as well.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top