Issue T18784
Visible to All Users

Sanitize HTML within SurveyJS Creator

created a year ago (modified a year ago)

[Ticket cloned from T18769: XSS Security issue with markdown]

Hello again,
Yesterday, I said it is ok,
it is ok wit the form side, fortunately end user wont see this issue

inside creator, the problem slightly changed but is not completely solved,
My method is this;

Code
creatorModel.onSurveyInstanceCreated.add(function (survey, options) {       options.survey.onTextMarkdown.add(doMarkdown); 

What do you recommend to solve this issue for creator
You can see a little demo attached; first part is creator, second part is form

Answers approved by surveyjs Support

created a year ago

Hi Cef,
The issue is fixed in v1.11.6. Please upgrade your SurveyJS Creator and Library version.

Should you have any further questions, feel free to contact us at any time.

    Comments (2)

      it works, thank you very much.

        You're always welcome. Please feel free to contact us if you require further assistance.

        Thank you

        created a year ago

        Hello,
        I created the following demo: View Plunker. The demo uses the latest version of SurveyJS Creator. The survey.onTextMarkdown function is registered within the creator.onSurveyInstanceCreated function as follows:

        JavaScript
        creator.onSurveyInstanceCreated.add((sender, options) => { if(options.area = "designer-tab" || options.area === "preview-tab"){ options.survey.onTextMarkdown.add(processMarkdown); } })

        I confirm that the above code stops execution of a custom JS code within survey texts. If you haven't yet upgraded to the most recent version of SurveyJS (v1.11.4), please do so.

        Let me know how it goes.

          Show previous comments (3)

            I checked updated example and nothing changed. Could you please check out at my gif file that i send you before.

            Thanks.

              Hello Cef,
              Please accept my apologies for missing this. We will investigate the issue further and update you shortly.

              Thank you

                no problem, sincere…