From 7a40f4354b32809af3d0cfd6e3af0eda02ab0e0a Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 12 May 2012 17:57:41 -0700 Subject: some important stuff we'll need --- .../maintenance/generate-entity-file.php | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100755 lib/htmlpurifier/maintenance/generate-entity-file.php (limited to 'lib/htmlpurifier/maintenance/generate-entity-file.php') diff --git a/lib/htmlpurifier/maintenance/generate-entity-file.php b/lib/htmlpurifier/maintenance/generate-entity-file.php new file mode 100755 index 000000000..dee8e61e7 --- /dev/null +++ b/lib/htmlpurifier/maintenance/generate-entity-file.php @@ -0,0 +1,74 @@ +#!/usr/bin/php +/'; + +foreach ( $entity_files as $file ) { + $contents = file_get_contents($entity_dir . $file); + $matches = array(); + preg_match_all($regexp, $contents, $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + $entity_table[$match[1]] = unichr($match[2]); + } +} + +$output = serialize($entity_table); + +$fh = fopen($output_file, 'w'); +fwrite($fh, $output); +fclose($fh); + +echo "Completed successfully."; + +// vim: et sw=4 sts=4 -- cgit v1.2.3