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

background-image quote encoding #39

Open
flcdrg opened this issue Jan 1, 2024 · 3 comments
Open

background-image quote encoding #39

flcdrg opened this issue Jan 1, 2024 · 3 comments

Comments

@flcdrg
Copy link

flcdrg commented Jan 1, 2024

Seeing this invalid URL being logged in browser console for a post with image: front matter

GET
http://localhost:5080/2023/12/"/assets/2023/01/terraform-logo.png"

Looks like the double quotes in

mastheadStyle = $"background-image: url(\"{Context.GetLink(image)}\")";
are being HTML encoded

@flcdrg
Copy link
Author

flcdrg commented Jan 1, 2024

Switching line 12 to use single quotes inside the url() seems to fix this

@alex-hedley
Copy link

Is the metadata for the post
Image: "/assets/2023/01/terraform-logo.png"
instead of
Image: /assets/2023/01/terraform-logo.png

@flcdrg
Copy link
Author

flcdrg commented Jan 3, 2024

No, it wasn't quoted in the .md file

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

No branches or pull requests

2 participants