https://github.com/threedaymonk/htmlentities
HTMLEntities is a simple library to facilitate encoding and decoding of named (ý and so on) or numerical ({ or Ī) entities in HTML and XHTML documents.
https://github.com/threedaymonk/htmlentities
Last synced: about 12 hours ago
JSON representation
Repository metadata
HTMLEntities is a simple library to facilitate encoding and decoding of named (ý and so on) or numerical ({ or Ī) entities in HTML and XHTML documents.
- Host: GitHub
- URL: https://github.com/threedaymonk/htmlentities
- Owner: threedaymonk
- License: other
- Created: 2009-06-11T16:53:24.000Z (over 16 years ago)
- Default Branch: main
- Last Pushed: 2025-12-30T18:38:49.000Z (2 months ago)
- Last Synced: 2026-01-22T01:53:26.455Z (about 1 month ago)
- Language: Ruby
- Homepage:
- Size: 243 KB
- Stars: 339
- Watchers: 6
- Forks: 31
- Open Issues: 7
- Releases: 0
-
Metadata Files:
- Readme: README.md
- Changelog: History.txt
- License: COPYING.txt
README.md
HTMLEntities
The canonical source for this project can be found at GitHub:
threedaymonk/htmlentities.
HTML entity encoding and decoding for Ruby
HTMLEntities is a simple library to facilitate encoding and decoding of named
(ý and so on) or numerical ({ or Ī) entities in HTML
and XHTML documents.
Usage
Decoding
require 'htmlentities'
coder = HTMLEntities.new
string = "élan"
coder.decode(string) # => "élan"
Encoding
This is slightly more complicated, due to the various options. The encode
method takes a variable number of parameters, which tell it which instructions
to carry out.
require 'htmlentities'
coder = HTMLEntities.new
string = "<élan>"
Escape unsafe codepoints only:
coder.encode(string) # => "<élan>"
Or:
coder.encode(string, :basic) # => "<élan>"
Escape all entities that have names:
coder.encode(string, :named) # => "<élan>"
Escape all non-ASCII/non-safe codepoints using decimal entities:
coder.encode(string, :decimal) # => "<élan>"
As above, using hexadecimal entities:
coder.encode(string, :hexadecimal) # => "<élan>"
You can also use several options, e.g. use named entities for unsafe codepoints, then decimal for all other non-ASCII:
coder.encode(string, :basic, :decimal) # => "<élan>"
Flavours
HTMLEntities knows about three different sets of entities:
:xhtml1– Entities from the XHTML1 doctype:html4– Entities from the HTML4 doctype. Differs from +xhtml1+ only by the absence of +&apos+:expanded– Entities from a variety of SGML sets
The default is :xhtml, but you can override this:
coder = HTMLEntities.new(:expanded)
Licence
This code is free to use under the terms of the MIT licence. See the file
COPYING.txt for more details.
Contact
Send email to pbattley@gmail.com.
Owner metadata
- Name: Paul Battley
- Login: threedaymonk
- Email:
- Kind: user
- Description:
- Website: http://po-ru.com/
- Location: London
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/17347?u=759e40555756873625b01b898e91919007838fd4&v=4
- Repositories: 138
- Last ynced at: 2024-12-06T21:43:39.991Z
- Profile URL: https://github.com/threedaymonk
GitHub Events
Total
- Delete event: 1
- Fork event: 1
- Watch event: 5
- Issue comment event: 1
- Push event: 4
Last Year
- Delete event: 1
- Fork event: 1
- Watch event: 2
- Issue comment event: 1
- Push event: 4
Committers metadata
Last synced: 2 days ago
Total Commits: 147
Total Committers: 8
Avg Commits per committer: 18.375
Development Distribution Score (DDS): 0.048
Commits in past year: 29
Committers in past year: 3
Avg Commits per committer in past year: 9.667
Development Distribution Score (DDS) in past year: 0.069
| Name | Commits | |
|---|---|---|
| Paul Battley | p****y@g****m | 140 |
| Stephan Kaag | s****g@m****m | 1 |
| Ryunosuke SATO | t****s@g****m | 1 |
| Junya Ishihara | j****a@c****m | 1 |
| John Merrells | j****n@m****m | 1 |
| Jan Andersson | j****n@g****m | 1 |
| Yulia Chepurna | y****a@t****m | 1 |
| Jan Andersson | j****n@m****m | 1 |
Committer domains:
- mynewsdesk.com: 1
- thinkdataworks.com: 1
- merrells.com: 1
- champierre.com: 1
- moneybird.com: 1
Issue and Pull Request metadata
Last synced: about 2 months ago
Total issues: 31
Total pull requests: 8
Average time to close issues: 2 months
Average time to close pull requests: over 2 years
Total issue authors: 29
Total pull request authors: 7
Average comments per issue: 3.03
Average comments per pull request: 2.75
Merged pull request: 1
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 1
Past year average time to close issues: about 16 hours
Past year average time to close pull requests: 1 day
Past year issue authors: 1
Past year pull request authors: 1
Past year average comments per issue: 2.0
Past year average comments per pull request: 4.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- amomchilov (2)
- nathany (2)
- Mandaryn (1)
- yondaimeorg (1)
- joshminnie (1)
- denegny (1)
- gucki (1)
- Cahl-Dee (1)
- doconnor-clintel (1)
- shedd (1)
- ckruse (1)
- mslinn (1)
- Timberjaw (1)
- ydakuka (1)
- andrewhavens (1)
Top Pull Request Authors
- janne (2)
- stephanmoneybird (1)
- nholden (1)
- amomchilov (1)
- yulia-che (1)
- Jerska (1)
- tricknotes (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 14
-
Total downloads:
- rubygems: 440,689,378 total
- Total docker downloads: 1,383,199,268
- Total dependent packages: 412 (may contain duplicates)
- Total dependent repositories: 15,981 (may contain duplicates)
- Total versions: 63
- Total maintainers: 1
gem.coop: htmlentities
A module for encoding and decoding (X)HTML entities.
- Homepage: https://github.com/threedaymonk/htmlentities
- Documentation: http://www.rubydoc.info/gems/htmlentities/
- Licenses: MIT
- Latest release: 4.4.2 (published 3 months ago)
- Last Synced: 2026-03-02T18:32:37.049Z (1 day ago)
- Versions: 17
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 220,394,484 Total
- Docker Downloads: 691,599,634
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 0.038%
- Downloads: 0.113%
- Maintainers (1)
rubygems.org: htmlentities
A module for encoding and decoding (X)HTML entities.
- Homepage: https://github.com/threedaymonk/htmlentities
- Documentation: http://www.rubydoc.info/gems/htmlentities/
- Licenses: MIT
- Latest release: 4.4.2 (published 3 months ago)
- Last Synced: 2026-03-02T01:31:14.006Z (2 days ago)
- Versions: 17
- Dependent Packages: 412
- Dependent Repositories: 15,981
- Downloads: 220,294,894 Total
- Docker Downloads: 691,599,634
-
Rankings:
- Dependent packages count: 0.11%
- Downloads: 0.112%
- Docker downloads count: 0.17%
- Dependent repos count: 0.28%
- Average: 1.176%
- Stargazers count: 3.104%
- Forks count: 3.28%
- Maintainers (1)
proxy.golang.org: github.com/threedaymonk/htmlentities
- Homepage:
- Documentation: https://pkg.go.dev/github.com/threedaymonk/htmlentities#section-documentation
- Licenses: other
- Latest release: v4.4.1+incompatible (published 3 months ago)
- Last Synced: 2026-02-25T09:01:26.782Z (7 days ago)
- Versions: 18
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Stargazers count: 3.057%
- Forks count: 3.099%
- Average: 6.624%
- Dependent packages count: 9.56%
- Dependent repos count: 10.779%
ubuntu-22.04: ruby-htmlentities
- Homepage: https://github.com/threedaymonk/htmlentities
- Licenses:
- Latest release: 4.3.3-1 (published 18 days ago)
- Last Synced: 2026-02-13T13:18:37.109Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-23.04: ruby-htmlentities
- Homepage: https://github.com/threedaymonk/htmlentities
- Licenses:
- Latest release: 4.3.3-1.1 (published 21 days ago)
- Last Synced: 2026-02-11T06:41:00.145Z (21 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-23.10: ruby-htmlentities
- Homepage: https://github.com/threedaymonk/htmlentities
- Licenses:
- Latest release: 4.3.3-1.1 (published 18 days ago)
- Last Synced: 2026-02-13T18:22:46.448Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-11: ruby-htmlentities
- Homepage: https://github.com/threedaymonk/htmlentities
- Documentation: https://packages.debian.org/bullseye/ruby-htmlentities
- Licenses:
- Latest release: 4.3.3-1 (published 21 days ago)
- Last Synced: 2026-02-13T08:21:19.569Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-10: ruby-htmlentities
- Homepage: https://github.com/threedaymonk/htmlentities
- Documentation: https://packages.debian.org/buster/ruby-htmlentities
- Licenses:
- Latest release: 4.3.3-1 (published 21 days ago)
- Last Synced: 2026-02-13T04:22:13.106Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
guix: ruby-htmlentities
Encode and decode (X)HTML entities
- Homepage: https://github.com/threedaymonk/htmlentities
- Documentation: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/ruby-xyz.scm#n14709
- Licenses: expat
- Latest release: 4.3.4 (published 1 day ago)
- Last Synced: 2026-03-02T18:58:31.119Z (1 day ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
ubuntu-20.04: ruby-htmlentities
- Homepage: https://github.com/threedaymonk/htmlentities
- Licenses:
- Latest release: 4.3.3-1 (published 19 days ago)
- Last Synced: 2026-02-13T07:15:05.838Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-htmlentities
- Homepage: https://github.com/threedaymonk/htmlentities
- Documentation: https://packages.debian.org/bookworm/ruby-htmlentities
- Licenses:
- Latest release: 4.3.3-1.1 (published 19 days ago)
- Last Synced: 2026-02-12T23:32:16.246Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
debian-13: ruby-htmlentities
- Homepage: https://github.com/threedaymonk/htmlentities
- Documentation: https://packages.debian.org/trixie/ruby-htmlentities
- Licenses:
- Latest release: 4.3.3-1.1 (published 19 days ago)
- Last Synced: 2026-02-13T13:16:22.286Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- rake >= 12.3.3 development
- rspec ~> 3 development
- actions/checkout v5 composite
- ruby/setup-ruby v1 composite
Score: 29.250126513306608