Malformed document page when URL query contains slash
- Dominant language
- Ruby
- Stars
- 265
- Forks
- 347
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 2
Description
I came across a few links from Google search and found out that precedence of slash (`/`) in the URL query string will lead to malformed / unresponsive document page.
Example of malformed page: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html?example.com/a
I believe the root cause is in the TOC fetching script:
https://github.com/elastic/docs/blob/5b6ac7928c141d9eebeb13d078501a5e77d64d13/resources/web/docs_js/index.js#L253-L260
In this case `location.href` is `https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html?example.com/a`, and after replacing the string it will fetch and append `https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html?example.com/toc.html` which causes infinite loop and unresponsive page.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.