\Kaloa\Renderer\MarkdownEncoder

Summary

Methods
Properties
Constants
setNoEntities()
encodeAttribute()
encodeAmpsAndAngles()
encodeEmailAddress()
No public properties found
No constants found
No protected methods found
$no_entities
N/A
No private methods found
No private properties found
N/A

Properties

$no_entities

$no_entities : 

Type

Methods

setNoEntities()

setNoEntities(  $noEntities) 

Parameters

$noEntities

encodeAttribute()

encodeAttribute(string  $text) : string

Encode text for a double-quoted HTML attribute. This function is *not* suitable for attributes enclosed in single quotes.

Parameters

string $text

Returns

string

encodeAmpsAndAngles()

encodeAmpsAndAngles(string  $text) : string

Smart processing for ampersands and angle brackets that need to be encoded. Valid character entities are left alone unless the no-entities mode is set.

Parameters

string $text

Returns

string

encodeEmailAddress()

encodeEmailAddress(string  $addr) : string

Input: an email address, e.g. "foo@example.com"

Output: the email address as a mailto link, with each character of the address encoded as either a decimal or hex entity, in the hopes of foiling most address harvesting spam bots. E.g.:

foo@exampl e.com

Based by a filter by Matthew Wickline, posted to BBEdit-Talk. With some optimizations by Milian Wolff.

Parameters

string $addr

Returns

string