From 6854cb3f4d8219cf1829e32122eb2502a916eae9 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 1 Feb 2020 09:05:48 +0100 Subject: initial checkin --- .../maintenance/generate-entity-file.php | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100755 vendor/ezyang/htmlpurifier/maintenance/generate-entity-file.php (limited to 'vendor/ezyang/htmlpurifier/maintenance/generate-entity-file.php') diff --git a/vendor/ezyang/htmlpurifier/maintenance/generate-entity-file.php b/vendor/ezyang/htmlpurifier/maintenance/generate-entity-file.php new file mode 100755 index 0000000..ff1713e --- /dev/null +++ b/vendor/ezyang/htmlpurifier/maintenance/generate-entity-file.php @@ -0,0 +1,75 @@ +#!/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-70-g09d2