A summary of data about the Ruby ecosystem.

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 6 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.

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) # => "&lt;élan&gt;"

Or:

coder.encode(string, :basic) # => "&lt;élan&gt;"

Escape all entities that have names:

coder.encode(string, :named) # => "&lt;&eacute;lan&gt;"

Escape all non-ASCII/non-safe codepoints using decimal entities:

coder.encode(string, :decimal) # => "&#60;&#233;lan&#62;"

As above, using hexadecimal entities:

coder.encode(string, :hexadecimal) # => "&#x3c;&#xe9;lan&#x3e;"

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) # => "&lt;&#233;lan&gt;"

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


GitHub Events

Total
Last Year

Committers metadata

Last synced: 7 days ago

Total Commits: 145
Total Committers: 8
Avg Commits per committer: 18.125
Development Distribution Score (DDS): 0.048

Commits in past year: 27
Committers in past year: 3
Avg Commits per committer in past year: 9.0
Development Distribution Score (DDS) in past year: 0.074

Name Email Commits
Paul Battley p****y@g****m 138
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:


Issue and Pull Request metadata

Last synced: 12 days 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

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/threedaymonk/htmlentities

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

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 22 days ago)
  • Last Synced: 2025-12-09T17:01:59.778Z (2 days ago)
  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 213,467,461 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 22 days ago)
  • Last Synced: 2025-12-09T19:05:12.249Z (2 days ago)
  • Versions: 17
  • Dependent Packages: 412
  • Dependent Repositories: 15,981
  • Downloads: 213,482,880 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 23 days ago)
  • Last Synced: 2025-12-09T19:05:13.357Z (2 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%

Dependencies

htmlentities.gemspec rubygems
  • rake >= 12.3.3 development
  • rspec ~> 3 development
.github/workflows/ci.yml actions
  • actions/checkout v5 composite
  • ruby/setup-ruby v1 composite
Gemfile rubygems

Score: 29.242565243878285