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

Add support for relative urls in html fields #15

Merged
merged 5 commits into from
Jan 28, 2024

Conversation

chrisrhymes
Copy link
Owner

Resolves #14

  • Added an optional base argument for relative urls within fields that contain html.
  • Added tests
  • Updated readme

Testing

  • Checkout branch and run composer install and composer test

@chrisrhymes chrisrhymes added the enhancement New feature or request label Jan 17, 2024
@jordanade
Copy link

Wow, thanks for the update Chris! I still have an issue though — my relative links don't start with a slash. (I am using a <base> tag in my headers.) To determine the presence of a relative link it would be more correct to check that the link doesn't begin with a protocol (or at least doesn't begin with "http://" or "https://".

Cheers, Jordan

@chrisrhymes chrisrhymes merged commit 64c1cdc into main Jan 28, 2024
3 checks passed
@chrisrhymes chrisrhymes deleted the feature/support-relative-links branch January 28, 2024 21:12
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

Successfully merging this pull request may close these issues.

Failure to follow relative links or refer to "base" tag.
2 participants