Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML tags <details> and <summary> are removed / don't work #32

Closed
Schmuuu opened this issue Oct 11, 2017 · 5 comments
Closed

HTML tags <details> and <summary> are removed / don't work #32

Schmuuu opened this issue Oct 11, 2017 · 5 comments

Comments

@Schmuuu
Copy link

Schmuuu commented Oct 11, 2017

Hi,

I would like to create an FAQ with all the questions and when you click them, the answer in form of a text block will expand below this question. Before HTML5 this was usually achieved by Java script.

Now trying out Pico CMS I would like to go without any Java script and use only HTML5 instead.
The following works on a "normal" web page:

<details>
<summary>Short text</summary>
<p>Long, hidden text, that unfolds if visitor clicks on the summary text</p>
</details>

But using this in cms_pico these tags (details and summary) are removed on the web site and consequently there is no hidden text that unfolds/ expands.

Could these tags please be kept and not filtered out?

Thanks a lot.

Serverinfo:
Nextcloud 12.3
cms_pico 0.9.6
nginx 1.12
PHP 7.1

@ArtificialOwl
Copy link
Member

you will need to implement a plugin to generate those tags, and parse the html to remove any malicious javascript

@Schmuuu
Copy link
Author

Schmuuu commented Dec 11, 2017

ehm and how?
I consulted the pico team (https://github.com/picocms/Pico/) first (via their IRC channel actually) and they assured me that HTML5 tags work with Pico and it must be the Nextcloud app filtering these tags.

I got the impression that I enable the app and I'm ready to go. Where do I get such plugin and how to I implement it?

@ArtificialOwl
Copy link
Member

Please ckeck this page to understand why the app filters those tags.

@Schmuuu
Copy link
Author

Schmuuu commented Dec 11, 2017

Thanks for the link. I checked that site before and totally understand that.
However I'm wondering where the security risk is with these html tags.

https://www.w3schools.com/TAGS/tag_details.asp
For me it seems to be an html tag just like <p>, <div>, <h1> and so on.

My current page looks like this:

<h1>Frequently asked questions</h1>
</header>
<h2>General</h2>

<details open="open">
<summary>Little summary</summary>
<p>This is the content</p>
</details>

Every other tag works, only these html5 tags don't.
I already saw, that there are javascript files, that seem to handle html tags, but they are unreadable, because it's a huge one-liner.
Any help is appreciated.

@Schmuuu
Copy link
Author

Schmuuu commented Dec 12, 2017

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants