Added some more character entities to convert.
[project-aon.git] / scripts / gb-convert-entities.pl
1 #!/usr/bin/perl
2
3 while( <> ) {
4     if( /"[^">]*&([^;]+);/ && $1 !~ /^link/ ) {
5         warn "Entity $1 in attribute";
6     }
7     s{\&(apos|nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|ampersand|lsquot|rsquot|ldquot|rdquot|minus|endash|emdash|ellips|lellips|blankline|percent|thinspace|frac116|plus);}{<ch.$1/>}g;
8     print;
9 }