Skip to content

background-image quote encoding #39

Open

Description

@flcdrg

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

Activity

  1. flcdrg commented on Jan 1, 2024

    @flcdrg
    Author

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

  2. alex-hedley commented on Jan 2, 2024

    @alex-hedley

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

  3. flcdrg commented on Jan 3, 2024

    @flcdrg
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions