truncate-escaped-html
Converts special characters in a string to the corresponding HTML entities, then truncates the resulting string carefully (HTML entities are not cut in the middle).
amazon-asin
An efficient way to extract Amazon ASIN and ISBN from Amazon links. Supports Amazon premalinks (short URLs) and does everything once, not twice.