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

Ensure annotated sample article contains escaped source #1936

Closed
StevenClontz opened this issue Feb 28, 2023 · 5 comments
Closed

Ensure annotated sample article contains escaped source #1936

StevenClontz opened this issue Feb 28, 2023 · 5 comments

Comments

@StevenClontz
Copy link
Member

StevenClontz commented Feb 28, 2023

In e.g. Figure 9.4 of the Sample Article, a < character in the "View Source" fails to be escaped as &lt;.

@rbeezer
Copy link
Collaborator

rbeezer commented Feb 28, 2023

The modal serialize template in pretext-common.xsl probably needs two modes (a parameter). HTML for consumption by a browser and XML for viewing as how a "text" vesion of how source should be authored.

Might be as simple a matter in the latter case to convert & to &amp; in every single case, effectively breaking every escape sequences into a literal versions.

@kcrisman
Copy link
Contributor

kcrisman commented Feb 28, 2023 via email

@rbeezer
Copy link
Collaborator

rbeezer commented Feb 28, 2023

In fact, the CDATA markup also disappears currently.

CDATA always goes away as part of the XML parsing. Nothing can be done about that as far as I know (except to perhaps convert it back, but you wouldn't know when it was used and when it wasn't).

And we try to de-emphasize its use. It confuses a lot of principles and a lot of people.

@kcrisman
Copy link
Contributor

kcrisman commented Feb 28, 2023 via email

@rbeezer
Copy link
Collaborator

rbeezer commented Mar 3, 2023

Done. Pushing up a test to the website now.

Dual-purpose template: 70658bd

And employment: 7be4de4

Good catch - thanks!

@rbeezer rbeezer closed this as completed Mar 3, 2023
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

No branches or pull requests

3 participants