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

Consistency pass on href outputs #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

moppius
Copy link
Contributor

@moppius moppius commented Jul 29, 2023

Now they all have double quotes and all processed as safe, so it doesn't end up with HTML codes in the output URL.

For example, before this change, the <head> section would contain raw code as such:

    <link rel="preload" href=https:&#x2F;&#x2F;cdnjs.cloudflare.com&#x2F;ajax&#x2F;libs&#x2F;font-awesome&#x2F;6.3.0&#x2F;css&#x2F;all.min.css as="style" onload="this.onload=null;this.rel='stylesheet'">
    <noscript><link rel="stylesheet" href=https:&#x2F;&#x2F;cdnjs.cloudflare.com&#x2F;ajax&#x2F;libs&#x2F;font-awesome&#x2F;6.3.0&#x2F;css&#x2F;all.min.css></noscript>

After this change, the raw output is more consistent and clear:

    <link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
    <noscript><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"></noscript>

Similarly, the site header links were not processed as safe so they also looked similarly odd in the raw code.

Now they all have double quotes and all processed as safe, so it doesn't end up with HTML codes in the output URL
@moppius
Copy link
Contributor Author

moppius commented Aug 6, 2023

I recommend squashing & merging this if you accept it, since I had to make two commits!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant