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

Pound char not decoded when using Rules or Vanity URLs #28089

Closed
erickgonzalez opened this issue Mar 27, 2024 · 1 comment · Fixed by #28444
Closed

Pound char not decoded when using Rules or Vanity URLs #28089

erickgonzalez opened this issue Mar 27, 2024 · 1 comment · Fixed by #28444
Assignees
Labels
OKR : Customer Support Owned by Scott Priority : 2 High QA : Approved Release : 23.01.18 Included in LTS patch release 23.01.18 Release : 23.10.24 v11 Included in LTS patch release 23.10.24 v11 Release : 24.04.24 v3 Included in LTS patch release 24.04.24 v3 Release : 24.05.20 Bug- Fixing Team : Bug Fixers Type : Defect

Comments

@erickgonzalez
Copy link
Contributor

erickgonzalez commented Mar 27, 2024

Parent Issue

No response

Problem Statement

It seems that there may be an issue with the decoding of the pound symbol (#) in redirects when utilizing Rules or Vanity URLs.

Steps to Reproduce

1- Create a new Rich Text content with the following data:
RichTextAnchors.txt
2- Create a new page at root level
3- Add the content created in step 1

Vanity Url:
1- Create a new Vanity URL with the following data:

  • Title: testpound
  • Uri: /testpound
  • Action: 301
  • Forward To: /test#SwissAlps
    2- From the Terminal hit the following curl:
curl --head https://demo.dotcms.com/testpound

3- Check the location response location: /test%23SwissAlps

Rules:
1- Create a new RuleL with the following data:

  • Title: testpoundrule
  • Evaluate: Every Page
  • Condition: Current Url -> Contains -> testpoundrule
  • Action: Redirect requests to -> MOVED_PERM -> /test#SwissAlps
    2- From the Terminal hit the following curl:
curl --head https://demo.dotcms.com/testpoundrule

3- Check the location response location: /test%23SwissAlps

Acceptance Criteria

Special Chars should be decoded.

dotCMS Version

23.01+

Proposed Objective

Customer Support

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://dotcms.slack.com/archives/C06QJH22CF8/p1711485642700329

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@dsolistorres dsolistorres self-assigned this Apr 29, 2024
github-merge-queue bot pushed a commit that referenced this issue May 13, 2024
… in urls (#28089) (#28444)

### Proposed Changes
* Pound character (#) doesn't need to be encoded in a URL. With this
fix, the target URL for a vanity URL (or a rule) will include the pound
character without encoding it when the URL includes a fragment.

### Checklist
- [x] Tests

---------

Co-authored-by: erickgonzalez <erick.gonzalez@dotcms.com>
@bryanboza
Copy link
Member

Fixed, tested on the latest trunk

Vanity Url:

image

Rules:

image

@erickgonzalez erickgonzalez added the LTS : Next Ticket that will be added to LTS label May 22, 2024
@erickgonzalez erickgonzalez added Next LTS Release Shortlisted of issues that will be included in the upcoming LTS and removed LTS : Next Ticket that will be added to LTS labels Jun 7, 2024
erickgonzalez added a commit that referenced this issue Jun 13, 2024
erickgonzalez added a commit that referenced this issue Jun 14, 2024
erickgonzalez added a commit that referenced this issue Jun 18, 2024
@erickgonzalez erickgonzalez added Release : 24.04.24 v3 Included in LTS patch release 24.04.24 v3 Release : 23.10.24 v11 Included in LTS patch release 23.10.24 v11 Release : 23.01.18 Included in LTS patch release 23.01.18 and removed Next LTS Release Shortlisted of issues that will be included in the upcoming LTS labels Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OKR : Customer Support Owned by Scott Priority : 2 High QA : Approved Release : 23.01.18 Included in LTS patch release 23.01.18 Release : 23.10.24 v11 Included in LTS patch release 23.10.24 v11 Release : 24.04.24 v3 Included in LTS patch release 24.04.24 v3 Release : 24.05.20 Bug- Fixing Team : Bug Fixers Type : Defect
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants