Skip to content

PDF Generation for Products with Special Characters in Brand Names #46

Description

@medchicho

I encountered an issue while generating PDFs where some product brand names include special characters like &. To temporarily resolve this, I used .Replace("&", "&amp ;") in the FooterHtml property of Markdown2PdfOptions.

For a permanent fix, we can:

Update the Prompt: Adjust the product generation prompt to avoid names with special characters.
Use WebUtility.HtmlEncode: Automatically escape special characters (e.g., &, <, >) using WebUtility.HtmlEncode to handle them correctly in XML/HTML contexts.

Activity

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