/[pliva-si]/inc/fix_msshit.inc
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /inc/fix_msshit.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Thu Mar 28 14:00:59 2002 UTC (22 years ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +4 -0 lines
manje promjene radi boljeg indeksiranja

1 <?
2
3 // decode all entities to iso8859-2
4
5 function fix_msshit($s) {
6
7 $s=str_replace('&#200;','È',$s);
8 $s=str_replace('&#232;','è',$s);
9 $s=str_replace('&#198;','Æ',$s);
10 $s=str_replace('&#230;','æ',$s);
11 $s=str_replace('&#208;','Ð',$s);
12 $s=str_replace('&#240;','ð',$s);
13 $s=str_replace('&#138;','Š',$s);
14 $s=str_replace('&Scaron;','Š',$s);
15 $s=str_replace('&#154;','š',$s);
16 $s=str_replace('&scaron;','š',$s);
17 $s=str_replace('&#142;','Ž',$s);
18 $s=str_replace('&#381;','Ž',$s);
19 $s=str_replace('&#158;','ž',$s);
20 $s=str_replace('&#382;','ž',$s);
21 $s=str_replace('&egrave;','è',$s);
22 $s=str_replace('&#269;','è',$s);;
23 $s=str_replace('&Egrave;','È',$s);
24 $s=str_replace('&#268;','È',$s);
25 $s=str_replace('&aelig;','æ',$s);
26 $s=str_replace('&#263;','æ',$s);
27 $s=str_replace('&AElig;','Æ',$s);
28 $s=str_replace('&#262;','Æ',$s);
29 $s=str_replace('&eth;','ð',$s);
30 $s=str_replace('&#273;','ð',$s);
31 $s=str_replace('&Eth;','Ð',$s);
32 $s=str_replace('&#133;','...',$s);
33 $s=str_replace('&#9;','\t',$s);
34 # $s=str_replace('&nbsp;',' ',$s);
35 # $s=str_replace('&amp;','&',$s);
36 $s=str_replace('&#352;','©',$s);
37 $s=str_replace('&#353;','¹',$s);
38
39 $s=strtr($s,'šðžèæŠÐŽÈÆ','¹ð¾èæ©Ð®ÈÆ'); # 1250 -> iso8859-2
40
41 // remove paths from source
42 $s=str_replace('src="/data/pliva-si/','src="',$s);
43
44 // nuke <html>
45 $s=ereg_replace('</*html>','',$s);
46 $s=ereg_replace('^.*<body>','',$s);
47 $s=ereg_replace('</body>.*$','',$s);
48
49 return $s;
50 }
51
52 ?>

  ViewVC Help
Powered by ViewVC 1.1.26