4 require LWP::UserAgent;
7 $url = $ENV{"REQUEST_URI"};
8 $url =~ s/.*mmlurl=(.*)/$1/;
12 $ua = LWP::UserAgent->new;
13 $request = HTTP::Request->new(GET => "$url");
14 $response = $ua->request($request, \&callback);
17 $content =~ s/\n/ /sg;
18 $content =~ s/<!DOCTYPE[^>]*>//sg;
19 $content =~ s/<\?xml[^?]*\?>//sg;
21 $content =~ s/&/&/g;
22 $content =~ s/<m:/</g;
23 $content =~ s/<\/m:/<\//g;
24 $content =~ s/<math[^>]*>/<math>/sg;
25 $content =~ s/(<\/?semantics[^>]*>)/<!-- $1 -->/sg;
26 $content =~ s/(<annotation-xml)/<!-- $1/sg;
27 $content =~ s/(<\/annotation-xml>)/$1 -->/sg;
28 $content =~ s/<mo helm:xref='[^']*' xlink:href='([^']*)'>([^<]*)<\/mo>/<maction actiontype='href' other='$use_webeqp_url?uri=$1'><mo>$2<\/mo><\/maction>/sg;
29 $content =~ s/<mi helm:xref='[^']*' xlink:href='([^']*)'>([^<]*)<\/mi>/<maction actiontype='href' other='$use_webeqp_url?uri=$1'><mi>$2<\/mi><\/maction>/sg;
30 $content =~ s/helm:xref='[^']*'//sg;
31 $content =~ s/xmlns:helm='[^']*'//sg;
32 $content =~ s/xlink:href='[^']*'//sg;
33 $content =~ s/xmlns:xlink='[^']*'//sg;
34 $content =~ s/<mchar name='([^']*)' \/>/&$1;/sg;
37 Content-type: text/html
39 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
40 "http://www.w3.org/TR/REC-html40/loose.dtd">
43 <title>Generato in automatico a partire da $url</title>
45 <body bgcolor="#ffffff" text="#000000">
46 <applet codebase="http://www.webeq.com/WebEQ/2.2/classes" code="webeq.Main"
47 +width=600 height=2000 align=middle>
48 <param name=eq value="$content">
49 <param name=color value="#cccccc">
50 <param name=parser value="mathml">
51 <param name=size value="14">
57 #=========================