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

Dynamic content based on query params #148

Open
dgarcia360 opened this issue Apr 5, 2021 · 1 comment
Open

Dynamic content based on query params #148

dgarcia360 opened this issue Apr 5, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@dgarcia360
Copy link
Collaborator

dgarcia360 commented Apr 5, 2021

Requirement

We have a requests from different doc project for a dynamic page:
Take a URL like:
docs.scylladb.com/?node=x&user=y

And use it in the doc like:
"As a user Y you take the address of X and ..."

Implementation

The notation to write a substitution in the page's source code could look like:

"as a user ${ Y:developer} you take the address ..."

So, if the user does not provide a query param, the page will render a default value (developer) instead of ${Y}.

We need to make sure that no one can inject custom JS snippets or HTML tags like links to prevent others from injecting redirections or other malicious code.

@dgarcia360 dgarcia360 self-assigned this Apr 5, 2021
@tzach
Copy link
Collaborator

tzach commented Apr 8, 2021

"as a user ${ Y:developer} you take the address ..."

Likely, I would want to use this substitution for the entire page (maybe not always)

We need to make sure that no one can inject custom JS snippets or HTML tags like links to prevent others injecting redirections or other malicious code.

Good point

@dgarcia360 dgarcia360 added the enhancement New feature or request label Apr 19, 2021
@dgarcia360 dgarcia360 removed the low label Mar 22, 2022
@dgarcia360 dgarcia360 removed their assignment Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants