Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How to collapse text by using HTML

  • leiserin
  • leiserin's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 7 months ago #187131 by leiserin
How to collapse text by using HTML was created by leiserin
Hi,

I would like collapse a text in group description by using HTML:

code:

<details>
<summary>
Update News:
</summary>
<p>
Das neue <details>-Element ermöglicht es, ganz ohne den Einsatz von JavaScript,
ursprünglich verborgene Textinhalte aufzuklappen.
</p>
</details>


Doing this, the preview looks fine.





But after pressing the green save button, I get this:




My code was transformed to:

Update News: <p>Das neue</p>

-Element ermöglicht es, ganz ohne den Einsatz von JavaScript, ursprünglich verborgene Textinhalte aufzuklappen.
<p> </p>


Can anybody help me?
The topic has been locked.
  • holch
  • holch's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #187132 by holch
Replied by holch on topic How to collapse text by using HTML
Seems like the XSS-Filter in action. Have a look in the general settings of your Limesurvey installation and switch the XSS-filter off. This should do the trick.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #187140 by Joffm
Replied by Joffm on topic How to collapse text by using HTML
And remember,
as usual IE doesn't support this

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #187146 by DenisChenu
Replied by DenisChenu on topic How to collapse text by using HTML
Else, even with XSS , and working with IE,

Maybe you can use getbootstrap.com/docs/3.3/javascript/#collapse

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • leiserin
  • leiserin's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 7 months ago #187196 by leiserin
Replied by leiserin on topic How to collapse text by using HTML
My admin doesn't want to switch XSS off. I tried it with DenisChenus hint, but it didn't worked:

code:

<a class="btn btn-primary" role="button" data-bs-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
Link with href
</a>
<button class="btn btn-primary" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
Button with data-bs-target
</button>
<div class="collapse" id="collapseExample">
<div class="well">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</div>
</div>


transformed code:

<a class="btn btn-primary" href="#collapseExample">
Link with href
</a>

Button with data-bs-target

<div class="collapse" id="collapseExample">
<div class="well">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson
cred nesciunt sapiente ea proident.
</div>
</div>


Expected:
getbootstrap.com/docs/3.3/javascript/#collapse
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago #187199 by DenisChenu
Replied by DenisChenu on topic How to collapse text by using HTML
Can you try to disable HTML editor before save ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • leiserin
  • leiserin's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 7 months ago #187201 by leiserin
Replied by leiserin on topic How to collapse text by using HTML
Same result :(

My settings:

The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago - 4 years 7 months ago #187202 by Joffm
Replied by Joffm on topic How to collapse text by using HTML
Hm, have to test again
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 7 months ago by Joffm.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago - 4 years 7 months ago #187203 by DenisChenu
Replied by DenisChenu on topic How to collapse text by using HTML

Joffm wrote: I get this (normal embedded editor)

You must use a non super admin and XSS enabled. I confirm XSS disable usage of data-* …

@leiserin with your current system , i see only create a javascript in theme. If you are allowed to create and edit theme.

You need to create a complete js system : getbootstrap.com/docs/3.3/javascript/#via-javascript-3

I think you can report a feature request.
Think we can allow `aria-expanded` `data-*` and `role`

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 4 years 7 months ago by DenisChenu.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose