Parent Directory
|
Revision Log
++ ChangeLog 21 Jul 2008 12:51:50 -0000 * .htaccess: error-description-source.xml is in UTF-8 actually. * Makefile: Rule to make Japanese language catalog file is added. * cc-script.js: Line and column numbers are now taken from data-* attributes, not from textContent. * cc.cgi: Tentative support for Japanese/English conneg. (load_text_catalog, get_text): Removed (catalog text selection is now handled by WebHACC::Output). * error-description-source.xml: Catalog entries in new format are added. Old catalog element is removed. * mkcatalog.pl: Support for non-English languages. Drop support for old catalog element. Add support for new cat element. * mkdescription.pl: Drop support for old catalog element. Add support for new cat element. 2008-07-21 Wakaba <wakaba@suika.fam.cx> ++ html/WebHACC/Language/ChangeLog 21 Jul 2008 12:56:30 -0000 * DOM.pm (generate_structure_dump_section): Use catalog for human-readable texts. (generate_table_section): Use catalog for human readable texts. 2008-07-21 Wakaba <wakaba@suika.fam.cx> ++ html/WebHACC/ChangeLog 21 Jul 2008 12:55:41 -0000 * Input.pm: Most human-readable texts are now handled by catalog. (id_prefix): Support for nested subdocuments. * Output.pm (start_section, dt, xref): Section/item names and link labels are now handled by catalog. (load_text_catalog, nl_text): New methods. (html_header): Application name is moved to catalog. * Result.pm (add_error): Important error properties are now exposed to client-side script as data-* attributes. Labels are now handled by catalog. Error descriptions are now taken from catalog as it were. 2008-07-21 Wakaba <wakaba@suika.fam.cx>
| 1 | wakaba | 1.1 | package WebHACC::Output; |
| 2 | use strict; | ||
| 3 | wakaba | 1.3 | |
| 4 | wakaba | 1.1 | require IO::Handle; |
| 5 | wakaba | 1.3 | use Scalar::Util qw/refaddr/; |
| 6 | wakaba | 1.1 | |
| 7 | my $htescape = sub ($) { | ||
| 8 | my $s = $_[0]; | ||
| 9 | $s =~ s/&/&/g; | ||
| 10 | $s =~ s/</</g; | ||
| 11 | $s =~ s/>/>/g; | ||
| 12 | $s =~ s/"/"/g; | ||
| 13 | $s =~ s{([\x00-\x09\x0B-\x1F\x7F-\xA0\x{FEFF}\x{FFFC}-\x{FFFF}])}{ | ||
| 14 | sprintf '<var>U+%04X</var>', ord $1; | ||
| 15 | }ge; | ||