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

Feat toc fixing visual issues plus merge main #7305

Open
wants to merge 165 commits into
base: feat-toc
Choose a base branch
from

Conversation

TimoKruth
Copy link

Hi,

regarding PR #5101 and PR #5367 I saw you found issues with my branch I thought I try my best to fix them.

I merged the main. Tried to resolve all conflicts prefering code from main.

I fixed a duplicate ToC on the site and a wrong default selection. I fixed icons to be consistent and padding as well. I tested it with Firefox, Chrome and Safari on a M1 Mac.

I hope this helps. If you have any further notes what should be corrected please feel free to answer.

Best regards

NGPixel and others added 30 commits June 9, 2022 14:25
* fix: search results not displaying on first page
* fix: page cursor position stays the same between page selection
NGPixel and others added 24 commits October 18, 2023 21:35
* feat: added implementation for group mapping in SAML strategies

---------

Co-authored-by: Abderraouf El Gasser <[email protected]>
Co-authored-by: Nicolas Giard <[email protected]>
* Fix: email toLowerCase

* Fix python issue for node18 in Dockerfile
…6901)

* feat: update comment module "Artalk"
* fix: update code.yml

---------

Co-authored-by: Nicolas Giard <[email protected]>
* Update render.js

# Improved handling of mustache expressions and v-pre attribute assignment

## Changes Made:
- Ensured that the parent tag of such text nodes is explicitly set to a `<p>` tag with the `v-pre` attribute.
- Added debug messages for better understanding of the script execution flow [THIS SHOULD REMOVED WHEN PUSHING TO PRODUCTION].

## Why it Works:
- When a mustache expression is found, the script either wraps it in a new `<p>` tag with the `v-pre` attribute or adds the `v-pre` attribute to the existing parent `<p>` tag.
- This approach ensures that the template code is not removed but encapsulated within `<p>` tags with the `v-pre` attribute, as required.

## Test Cases Passed:
1. `<xyz>{{ constructor.constructor('alert(1)')() }}</xyz>`
2. `<xyz>{{ constructor.constructor('alert(1)')() }}</xyz>`
3. `<p><xyz>{{ constructor.constructor('alert(1)')() }}</p>`
4. `<p><xyz>{{ constructor.constructor('alert(1)')() }}</xyz></p>`
5. `<p>&lt;xyz&gt;{{constructor.constructor('alert("Test Case 8")')()}}&lt;xyz&gt;{{constructor.constructor('alert("Test Case 9")')()}}&lt;/xyz&gt;</p>`

This commit enhances the robustness and reliability of handling mustache expressions and ensures proper assignment of the `v-pre` attribute, to ensure that there is no room for the weaponization of the template code later in the rendering process.

* fix: move template expressions after dom-purify + handle text nodes without parent

---------

Co-authored-by: NGPixel <[email protected]>
… fixed open ones to be like opened collapsable ones; try to make the template a little cleaner
@auto-assign auto-assign bot requested a review from NGPixel August 17, 2024 20:33
@NGPixel
Copy link
Member

NGPixel commented Aug 17, 2024

Use rebase, your PR contains a ton of unrelated file changes

@TimoKruth
Copy link
Author

TimoKruth commented Aug 18, 2024

Use rebase, your PR contains a ton of unrelated file changes

Would it help to merge it into main instead of the outdated feat-toc branch?
Then only the feat-toc changes and my new additions would be noted in the commits. If that is not prefered I will rebase onto the old feat-toc and update the pr.
Please feel free to choose which one you want.

third option just inspect the last three Commits from me since they are the only changed files that are not already in main.

@TimoKruth TimoKruth mentioned this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.