Skip to content

[BUG] company field is not properly escaped in XML #1407

@MikaelSiidorow

Description

@MikaelSiidorow

Issue Category

  • Enhancement
  • Bug
  • Question
  • Documentation gap/issue

Product Versions

  • Please specify what version of the library you are using......: 4.0.1
  • Please specify what version(s) of PowerPoint you are targeting: newest?
  • Please specify what web browser you are using.................: irrelevant

Desired Behavior

Setting company name works

const powerpoint = new pptxgenjs()
// ... set up master slide
powerpoint.company = "Acme, Inc. & Partners > competitors"
// ... set up slides
// ... export

Expect the file to work perfectly.

Observed Behavior

Generates XML (docProps/app.xml):

	<Company>Acme, Inc. & Partners > competitors</Company>

PowerPoint will report broken file. In Web PowerPoint it can repair automatically, but we will lose the company information.

Steps to Reproduce

Set company name to contain any unsafe XML characters and experience broken export.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions