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

Prelude: Escape XML text using the &…; method #1174

Merged
merged 2 commits into from May 20, 2021
Merged

Conversation

ehmry
Copy link
Collaborator

@ehmry ehmry commented May 13, 2021

We need to be escaping < in as &lt; in XML text (I disovered this while writing an Atom feed generator).

@ehmry ehmry changed the title Escape XML text using the &…; method Prelude: Escape XML text using the &…; method May 13, 2021
@ehmry ehmry force-pushed the xml-text-escaping branch 5 times, most recently from fc8b65e to 03a8396 Compare May 14, 2021 12:13
@ehmry
Copy link
Collaborator Author

ehmry commented May 14, 2021

I am not able to set the right hash on one of these files.

@Gabriella439
Copy link
Contributor

@ehmry: If you run ./scripts/lint-prelude.sh it should use the exact same logic as CI to update the Prelude files

@ehmry
Copy link
Collaborator Author

ehmry commented May 15, 2021

The hash is correct from my side.

@Gabriella439
Copy link
Contributor

@ehmry: Do you mean that you ran the script locally and it produced a different hash than the one that CI expects?

@ehmry
Copy link
Collaborator Author

ehmry commented May 15, 2021

I can't run the script, I'm on aarch64 and something haskell is broken. I've set the hash to the output of dhall hash but hydra seems to be flapping on in.

@Gabriella439
Copy link
Contributor

@ehmry: The main thing you need to change is this hash:

diff --recursive ./Prelude.actual/XML/render ./Prelude.expected/XML/render
1c1
<   ./render.dhall sha256:aff7efe61ce299381edca023e24bb5aaa0656c41bfa45dd705dab63519b7c5db
---
>   ./render.dhall sha256:550c8900fe199b83d629181d53c646f2f9425d9c64670dabb30d28e95bfa4c75
builder for '/nix/store/a7l6ja91blpbymrznbki02wdkrx9agpa-prelude-lint.drv' failed with exit code 1

Escape special markup characters using the method described here:
https://www.w3.org/TR/REC-xml/#syntax
@Gabriella439 Gabriella439 merged commit 5e14eea into master May 20, 2021
@Gabriella439 Gabriella439 deleted the xml-text-escaping branch May 20, 2021 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants