Skip to content

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

Merged
Gabriella439 merged 2 commits intomasterfrom
xml-text-escaping
May 20, 2021
Merged

Prelude: Escape XML text using the &…; method#1174
Gabriella439 merged 2 commits intomasterfrom
xml-text-escaping

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented May 13, 2021

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

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

ghost commented May 14, 2021

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

@Gabriella439
Copy link
Copy Markdown
Contributor

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

@ghost
Copy link
Copy Markdown
Author

ghost commented May 15, 2021

The hash is correct from my side.

@Gabriella439
Copy link
Copy Markdown
Contributor

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

@ghost
Copy link
Copy Markdown
Author

ghost 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
Copy Markdown
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

@ghost ghost force-pushed the xml-text-escaping branch from 99bc54c to 04d83ca Compare May 19, 2021 09:36
Escape special markup characters using the method described here:
https://www.w3.org/TR/REC-xml/#syntax
@ghost ghost force-pushed the xml-text-escaping branch from a7217ad to 5fb3af8 Compare May 19, 2021 10:56
@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.

1 participant