Skip to content

Conversation

PrinceNaroliya
Copy link
Contributor

@PrinceNaroliya PrinceNaroliya commented Sep 17, 2025

This PR clarifies the documentation of html.escape.

Previously, the docs said:

If the optional flag quote is true, the characters (") and (') are also translated...

This wording was slightly misleading because the default value of quote is already True.
Readers might think they need to explicitly pass quote=True, but in reality, the default behavior already translates (") and (').

✅ Changes in this PR:

  • Updated the wording to explicitly state that quote is True by default.
  • Added a note explaining that if quote is set to False, (") and (') are not translated.

Issue: gh-139006


📚 Documentation preview 📚: https://cpython-previews--139016.org.readthedocs.build/

@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Sep 17, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Sep 17, 2025
@StanFromIreland StanFromIreland changed the title Doc: Clarify html.escape function description (gh-139006) gh-139006: Doc: Clarify html.escape function description Sep 17, 2025
@ezio-melotti ezio-melotti added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Sep 17, 2025
@ezio-melotti ezio-melotti self-assigned this Sep 17, 2025
@ezio-melotti ezio-melotti merged commit 81c975b into python:main Sep 17, 2025
42 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Sep 17, 2025
@miss-islington-app
Copy link

Thanks @PrinceNaroliya for the PR, and @ezio-melotti for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 17, 2025
…nGH-139016)

(cherry picked from commit 81c975b)

Co-authored-by: PrinceNaroliya <naroliyaprince@gmail.com>
Doc: Clarify html.escape function description (pythonGH-139006)
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 17, 2025
…nGH-139016)

(cherry picked from commit 81c975b)

Co-authored-by: PrinceNaroliya <naroliyaprince@gmail.com>
Doc: Clarify html.escape function description (pythonGH-139006)
@bedevere-app
Copy link

bedevere-app bot commented Sep 17, 2025

GH-139036 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Sep 17, 2025
@bedevere-app
Copy link

bedevere-app bot commented Sep 17, 2025

GH-139037 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 17, 2025
ezio-melotti pushed a commit that referenced this pull request Sep 17, 2025
…39016) (#139037)

gh-139006: Doc: Clarify html.escape function description (GH-139016)
(cherry picked from commit 81c975b)


Doc: Clarify html.escape function description (GH-139006)

Co-authored-by: PrinceNaroliya <naroliyaprince@gmail.com>
ezio-melotti pushed a commit that referenced this pull request Sep 17, 2025
…39016) (#139036)

gh-139006: Doc: Clarify html.escape function description (GH-139016)
(cherry picked from commit 81c975b)


Doc: Clarify html.escape function description (GH-139006)

Co-authored-by: PrinceNaroliya <naroliyaprince@gmail.com>
@PrinceNaroliya PrinceNaroliya deleted the clarify-html-escape-doc branch September 17, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants