-
Notifications
You must be signed in to change notification settings - Fork 34
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
relative links get full path prepended #198
Comments
Hmm, interesting scenario. I couldn't quickly find it, but I recall a "force fully qualified URLs" plugin for WP, which may be a simple workaround for your scenario. If there's a more general issue with not supporting any relative URLs when publishing, that may require adding a failing unit/integration test here: https://github.com/leonstafford/static-html-output/blob/develop/tests/HTMLProcessorTest.php Then we can try to fix things for that test without breaking other ones. |
I don't understand what you are referring to, for the WP plugin forcing URLs, because this is content that WP is not involved with. It's just a link in the content, put in by the user, before I imported it into WP. |
Hmm, good points. I think we'll still need to approach it with a failing test to prove what's broken, then work on a fix |
I looked at your file of tests, but I don't understand what is needed to set up a test where the address of the current page is |
I have some content with relative links. As this is an old site that has been transformed a couple times, I use a plugin to put
.html
on my page slugs. It works great (maintaining old site structure), and static-html-output plugin works fine with that.However, for the existing relative links, the plugin transforms the link incorrectly.
The content contains a link like
<a href="collector2.html">E to H</a>
and the static page output has
<a href="http://example.com/folder/collector1.html/collector2.html">E to H</a>
I'm thinking that part of the code doesn't take into account that the current address might not be a folder, but a HTML file.
Where to look for this in the code?
The text was updated successfully, but these errors were encountered: