Welcome, Guest
Username: Password: Remember me

TOPIC: css tooltip random code insertion/adjustment

css tooltip random code insertion/adjustment 3 years 3 months ago #54669

  • ovdevilz
  • ovdevilz's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hi,

I have Version 1.87+ Build 8472 installed on my system and recently creating a survey with custom template which includes custom css code. I created a survey in 2 languages and also provides a quick translation tooltips when hovering on the flags image (achieved with css tooltip), which will provides (ms) flag on each question while viewing in (en) language and vice versa.

The codes for the tooltip is something like this...
<a class="tooltip" href="#"><img border="0" src="xxx/ms.png" /><span> the tooltip appear here on hovering ms.png</span></a>

When i save this survey, sometimes there is random code insertion within this tag, where sometimes it just ripped off the src and worse it even put the input tag on it and end up having an input text box instead of the current question with flag to hover.

This is weird because it only happen once in a while and on random places. For example, when i am editing question no.1 and tested the question, and not touching anything else then i activate to test the results. After activation and testing the survey, question 3 suddenly missing the flag and i checked the source code, the src tag have been "hijacked" making it impossible to load the ms.png as the original code supposed to be. And i am not touching question no 3 at all during editing.

any idea whats when wrong?

and also sometimes below the question, there is input box sometimes empty and sometimes there value in it but it doesnt effect any of the survey data so its not important.
The administrator has disabled public write access.

Re: css tooltip random code insertion/adjustment 3 years 3 months ago #54692

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3813
  • Thank you received: 683
  • Karma: 328
We can't really support custom templates or plugins but...

1) Is the tooltip pure CSS or is JavaScript used?

2) If JavaScript, do you have the XSS filter disabled (in 1.87, I believe you need to do it in configuration.php)?

3) Does the error always occur in the same question?

4) Are there any HTML errors (unclosed tags...)?

5) Have you tried modifying the question(s) with the editor disabled?

6) Can you activate a survey or provide a screenshot of this phantom input?
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: css tooltip random code insertion/adjustment 3 years 3 months ago #54708

  • ovdevilz
  • ovdevilz's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hi,

I used custom template just to remove and language switcher and css code insertion. The problem with the language switcher is that when users is halfway answering the question on that question and switch to another language, the previous answer will also be reset. I do not know if this kind of problem is only happen to me alone.

Back to the topic...

This issue have been resolved and up until now I still cannot think of the way that codes "hijack" into my input because I havent touch that question.. and now proceeding...

1) the tooltip is pure CSS.

2) I have XSS filter set to the appropriate setting because I also using JavaScripts to provide translation for the attributes.

3) No. Its random every time I touch the other question, which that question is perfect, and the code insertion occur on different question.

4) There are no HTML errors because I have the preset code in text files, using copy/paste and just edit the tooltip contents whichever necessary. And when there is errors, I just copy and paste back the preset code and its all running well. If I did something wrong in the HTML tag OR clumsy in editing the tooltip contents, its acceptable when there are no image flag shown because the redundant src without proper closing of the img tag (yes this happened once - and I am not sure if it is part of the errors or my mistake) but, to have an input text box for one of the answer options is unlikely to come from my mistake since I do not have access to any kind of FORM tag in whatsoever during the editing process.

5) You mean the Source code editor? I am just using the Source code editor on the Question because I believe the normal WYSIWYG editor will ignore or hard-coded my HTML tags. Strangely, those random error never happen on questions, but only the answer options. And I am not using HTML editor on answer options but directly put in the code into the provided input text box.

6) I have already activated the survey and its all run perfect.

What I did was, making sure all the codes are correct every time I edit even one single answer option and didnt Preview that editing. Only then I activating the survey. I have noticed that several time when I DID preview the question after done editing it and then activating that survey, this phantom input show up again.

I still havent figured out whats wrong but I managed to make it works.

Thanks.
The administrator has disabled public write access.

Re: css tooltip random code insertion/adjustment 3 years 3 months ago #54711

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3813
  • Thank you received: 683
  • Karma: 328
Okay, I'm happy it worked out.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.146 seconds
Donation Image