About

Module for lua decoding html entities :) by Tiago Danin.


htmlEntities for Lua Build Status Luarocks

HTML entities decoding/encoding

Installation

Written for Lua5.3 but working with lua5.2 and 5.1

Use the luarocks in your terminal

$ luarocks install html-entities

Using

Example

htmlEntities = require('htmlEntities')
print(htmlEntities.name) --htmlEntities-for-lua
print(htmlEntities.encode('Tiago Danin :)')) --Tiago Danin :)
print(htmlEntities.decode('Tiago Danin :)')) --Tiago Danin :)

Module

Function:

Function Info
htmlEntities Return table with about module and version
htmlEntities.decode(input) Decode html entities to text
htmlEntities.encode(input) Encode text to html entities (in ASCII) NOTE: Emoji is not supported here
htmlEntities.ASCII_HEX(input) Decode for ASCII HEX
htmlEntities.ASCII_DEC(input) Decode for ASCII DEC

Option:

String Default Info
error_msg_htmlEntities false View log of erros
debug_htmlEntities false Print output
ASCII_htmlEntities true Decode of entities in ASCII
register_global_module_htmlEntities false Register module as global
global_module_name_htmlEntities "htmlEntities" Name in global mode

Pages

Stable versions in Releases or LuaRocks

Suggestions and Support >> New Issue

WebSite >> TiagoDanin.github.io/htmlEntities-for-lua

License

MIT by Tiago Danin


Lua

3

171 KB