BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] Seeking information on binaries called "entities" and "fixup"
- Subject: [Discuss] Seeking information on binaries called "entities" and "fixup"
- From: greg at freephile.com (Greg Rundlett (freephile))
- Date: Thu, 31 Jul 2014 10:32:09 -0400
- In-reply-to: <53D5BE9D.7030100@horne.net>
- References: <53D5BE9D.7030100@horne.net>
On Sun, Jul 27, 2014 at 11:08 PM, Bill Horne <bill at horne.net> wrote: > I'm moving the Telecom Digest to a new server, and I'm seeking information > about a binary named "entities", and one named "fixup". I've found them in > a script that processes emails into html pages for publications, but the > script's author isn't available, and neither is working. > > AFAICT, "entities" is supposed to replace ASCII characters with HTML > Entities where needed, and I don't know what "fixup" is supposed to do. > > [replying to all this time] Here is a PHP function that could help you replace the 'entities' binary /** * Replaces ampersands with html entity, making it safe for XML * use lookahead assertion that the ampersand is not followed by an optional hash, one or more * word characters and a semicolon. In other words, it WILL match if it's a bare ampersand, * such as in the string "H&R Block" but * will leave friendly entities like " or Õ alone * @see http://www.php.net/manual/en/regexp.reference.assertions.php * @param string $message * @return string */ function entitySafe($message) { return preg_replace('/&(?!#?\w+;)/', '&', $message); } Greg Rundlett http://eQuality-Tech.com <http://equality-tech.com/> http://freephile.org
- References:
- [Discuss] Seeking information on binaries called "entities" and "fixup"
- From: bill at horne.net (Bill Horne)
- [Discuss] Seeking information on binaries called "entities" and "fixup"
- Prev by Date: [Discuss] Sync Revisited: inotify
- Next by Date: [Discuss] Looking for WiFi router with certain characteristics
- Previous by thread: [Discuss] Seeking information on binaries called "entities" and "fixup"
- Next by thread: [Discuss] Looking for WiFi router with certain characteristics
- Index(es):