Technical question
Aug. 14th, 2008 10:05Is there a regular expression that would allow me to replace any character above ASCII-128 in a string with the HTML entity equiv, an in:
replace in {string}: ascii-X with &#X; where X between 128 and 255
It would save a nested loop if I could figure out how to do it in one statement.
replace in {string}: ascii-X with &#X; where X between 128 and 255
It would save a nested loop if I could figure out how to do it in one statement.
no subject
Date: 2008-08-14 16:02 (UTC)ascii_to_entities(str [string])
Converts ASCII to Entities
Class: Regex (REGX)
Description: Returns str after converting higher ASCII values into HTML entities where possible. Only use when the auto_convert_high_ascii config file preference is set to yes (i.e. $PREFS->ini('auto_convert_high_ascii') == 'y').