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

[XML] Export functionality creates invalid XML #1060

Open
andygrunwald opened this issue Mar 31, 2024 · 0 comments
Open

[XML] Export functionality creates invalid XML #1060

andygrunwald opened this issue Mar 31, 2024 · 0 comments
Labels

Comments

@andygrunwald
Copy link
Collaborator

Current Behavior

The export functionality at http://localhost:8080/index.php?mod=install&action=export&step=2 creates invalid HTML.
The functionality exports Database content in a raw fashion. If the content contains a & char (e.g. in a link), the XML output is invalid and can't be displayed in a browser.

Expected Behavior

XML export creates valid HTML.

Possible Solution

I think the XML class should be split into a XMLReader and XMLWriter.
This makes the responsibility clear.

The XMLReader can be supported via Symfony DomCrawler Component: https://symfony.com/doc/current/components/dom_crawler.html

The XMLWriter should use https://www.php.net/manual/en/book.xmlwriter.php to ensure proper XML is written.

Steps to Reproduce (for bugs)

  1. Create a entry in the Beamer module that contains an & character
  2. Go to http://localhost:8080/index.php?mod=install&action=export&step=2
  3. Export the Beamer module
  4. Download the XML and view it in a browser
@andygrunwald andygrunwald added this to the LanSuite 5.0 RC milestone Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant