GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Google Code Issue 157: Add "escape invisible characters" option by gsnedders · Pull Request #38 · html5lib/html5lib-python

Conversation

@gsnedders

@gsnedders gsnedders commented May 4, 2013

Copy link
Copy Markdown
Member

Reported by @fantasai, Jul 27, 2010
Having invisible characters in the source code can be confusing to someone who's trying to figure out what's going on. Adding an escape_invisible option would make those characters visible in the source code.

The attached patch implements an escape_invisible option. The list of invisible characters is probably incomplete for this iteration, but you get the idea. It depends on the patch in issue 156 .

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
fantasai and others added 2 commits May 4, 2013 13:42
@fantasai @gsnedders
Google Code Issue 157: Add "escape invisible characters" option
f4f1fb8
Vaguely updated, but basically working.
@gsnedders
fixup! Google Code Issue 157: Add "escape invisible characters" option
9344001
@ghost ghost assigned gsnedders May 4, 2013
@gsnedders gsnedders mentioned this pull request Jul 20, 2015
HTMLSerializer and HTML entities #197
Closed
@gsnedders gsnedders modified the milestones: 1.1, 0.99999999 May 8, 2016
@gsnedders gsnedders removed this from the 0.99999999 milestone May 20, 2016
@gsnedders gsnedders removed their assignment Sep 1, 2017
@gsnedders

gsnedders commented Sep 1, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

My preference would be something based on unicodedata and blacklisting General Category C* (though that has the problem that you'll end up blacklisting different sets of characters depending on the Python version and the Unicode version, and generating that set is expensive and hence likely should be precomputed at dist build-time, and likely needs to be represented as a segment tree rather than a set of millions of characters out of concern for memory consumption).

We also need to be careful on narrow Python builds and make sure we don't encode surrogate pairs, as \uD800\uDC00 needs to end up unchanged.

It's also notable that AFAICT the origin reason for this patch no longer holds true (the CSS testsuite build system is basically a historical artefact now and hasn't used an html5lib fork with this for years), though as #197 shows other people do care.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@gsnedders @fantasai
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.