Popularity
6.5
Growing
Activity
0.0
-
68
4
24

Monthly Downloads: 1,459,498
Programming language: Elixir
License: MIT License
Tags: Miscellaneous     HTML    
Latest version: v0.5.1

html_entities alternatives and similar packages

Based on the "HTML" category.
Alternatively, view html_entities alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of html_entities or a related project?

Add another 'HTML' Package

README

HtmlEntities

Elixir module for decoding and encoding HTML entities in a string.

Entity names, codepoints and their corresponding characters are copied from Wikipedia.

Installation

Add the dependency to your mix.exs file, then run mix deps.get.

defp deps do
  [{:html_entities, "~> 0.4"}]
end

Usage

Inside iex:

iex> HtmlEntities.decode("Tom & Jerry")
"Tom & Jerry"
iex> HtmlEntities.decode("¡Ay, caramba!")
"¡Ay, caramba!"
iex> HtmlEntities.encode("<< KAPOW!! >>")
"&lt;&lt; KAPOW!! &gt;&gt;"

Inside a module:

defmodule EntityTest do
  def non_breaking_space do
    HtmlEntities.decode("&#161;")
  end
end