function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jkcjkc 

Fixing Reflected XSS issue

Hi,
I'm trying to add JSENCODE into the the <div> onclick function but I am getting an error: Incorrect argument type for function 'JSENCODE()'. : Markup

Here is the code on my Visualforce component  - strKeySet is just a string/text
<apex:repeat value="{!arKeySet}" var="strKeySet">
    <div class="section">
        <div class="header">
            <div id="Plus_{!strKeySet}" class="IconPlus slds-float--left Plus{!strKeySet}" onclick="console.log('{!JSENCODE(strKeySet)}'); return false;">
            </div>
            <div id="Minus_{!strKeySet}" class="IconMinus slds-float--left Minus{!strKeySet}" style="display: none;" onclick="console.log('{!JSENCODE(strKeySet)}'); return false;">
            </div>
            <apex:repeat value="{!objLastestEventsForVF[strKeySet]}" var="objLatestEvent">
                <div class="column1 slds-float--left">
                    <b>
                        <apex:outputText value="{!objLatestEvent.strTempName}" title="{!objLatestEvent.strTempName}"/>
                    </b>
                </div>
            </apex:repeat>
        </div>
    </div>
</apex:repeat>


Please help. Thanks