4 if($wgUseTeX) require_once( "Math.php" );
7 var $mHeaders, $mCookies, $mMetatags, $mKeywords;
8 var $mLinktags, $mPagetitle, $mBodytext, $mDebugtext;
9 var $mHTMLtitle, $mRobotpolicy, $mIsarticle, $mPrintable;
10 var $mSubtitle, $mRedirect;
11 var $mLastModified, $mCategoryLinks;
14 var $mSuppressQuickbar;
17 var $mContainsOldMagic, $mContainsNewMagic;
18 var $mIsArticleRelated;
20 var $mShowFeedLinks = false;
21 var $mEnableClientCache = true;
25 $this->mHeaders
= $this->mCookies
= $this->mMetatags
=
26 $this->mKeywords
= $this->mLinktags
= array();
27 $this->mHTMLtitle
= $this->mPagetitle
= $this->mBodytext
=
28 $this->mRedirect
= $this->mLastModified
=
29 $this->mSubtitle
= $this->mDebugtext
= $this->mRobotpolicy
=
30 $this->mOnloadHandler
= "";
31 $this->mIsArticleRelated
= $this->mIsarticle
= $this->mPrintable
= true;
32 $this->mSuppressQuickbar
= $this->mPrintable
= false;
33 $this->mLanguageLinks
= array();
34 $this->mCategoryLinks
= array() ;
35 $this->mDoNothing
= false;
36 $this->mContainsOldMagic
= $this->mContainsNewMagic
= 0;
37 $this->mParserOptions
= ParserOptions
::newFromUser( $temp = NULL );
38 $this->mSquidMaxage
= 0;
42 function addHeader( $name, $val ) { array_push( $this->mHeaders
, "$name: $val" ) ; }
43 function addCookie( $name, $val ) { array_push( $this->mCookies
, array( $name, $val ) ); }
44 function redirect( $url, $responsecode = '302' ) { $this->mRedirect
= $url; $this->mRedirectCode
= $responsecode; }
46 # To add an http-equiv meta tag, precede the name with "http:"
47 function addMeta( $name, $val ) { array_push( $this->mMetatags
, array( $name, $val ) ); }
48 function addKeyword( $text ) { array_push( $this->mKeywords
, $text ); }
49 function addScript( $script ) { $this->mScripts
.= $script; }
50 function getScript() { return $this->mScripts
; }
52 function addLink( $linkarr ) {
53 # $linkarr should be an associative array of attributes. We'll escape on output.
54 array_push( $this->mLinktags
, $linkarr );
57 function addMetadataLink( $linkarr ) {
58 # note: buggy CC software only reads first "meta" link
59 static $haveMeta = false;
60 $linkarr["rel"] = ($haveMeta) ?
"alternate meta" : "meta";
61 $this->addLink( $linkarr );
65 # checkLastModified tells the client to use the client-cached page if
66 # possible. If sucessful, the OutputPage is disabled so that
67 # any future call to OutputPage->output() have no effect. The method
68 # returns true iff cache-ok headers was sent.
69 function checkLastModified ( $timestamp )
71 global $wgLang, $wgCachePages, $wgUser;
72 if( !$wgCachePages ) {
73 wfDebug( "CACHE DISABLED\n", false );
76 if( preg_match( '/MSIE ([1-4]|5\.0)/', $_SERVER["HTTP_USER_AGENT"] ) ) {
77 # IE 5.0 has probs with our caching
78 wfDebug( "-- bad client, not caching\n", false );
81 if( $wgUser->getOption( "nocache" ) ) {
82 wfDebug( "USER DISABLED CACHE\n", false );
86 $lastmod = gmdate( "D, j M Y H:i:s", wfTimestamp2Unix( max( $timestamp, $wgUser->mTouched
) ) ) . " GMT";
88 if( !empty( $_SERVER["HTTP_IF_MODIFIED_SINCE"] ) ) {
89 # IE sends sizes after the date like this:
90 # Wed, 20 Aug 2003 06:51:19 GMT; length=5202
91 # this breaks strtotime().
92 $modsince = preg_replace( '/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"] );
93 $ismodsince = wfUnix2Timestamp( strtotime( $modsince ) );
94 wfDebug( "-- client send If-Modified-Since: " . $modsince . "\n", false );
95 wfDebug( "-- we might send Last-Modified : $lastmod\n", false );
97 if( ($ismodsince >= $timestamp ) and $wgUser->validateCache( $ismodsince ) ) {
98 # Make sure you're in a place you can leave when you call us!
99 header( "HTTP/1.0 304 Not Modified" );
100 $this->mLastModified
= $lastmod;
101 $this->sendCacheControl();
102 wfDebug( "CACHED client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp\n", false );
106 wfDebug( "READY client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp\n", false );
107 $this->mLastModified
= $lastmod;
110 wfDebug( "We're confused.\n", false );
111 $this->mLastModified
= $lastmod;
115 function getPageTitleActionText () {
119 return wfMsg('edit');
121 return wfMsg('history_short');
123 return wfMsg('unprotect');
125 return wfMsg('unprotect');
127 return wfMsg('delete');
129 return wfMsg('watch');
131 return wfMsg('unwatch');
133 return wfMsg('preview');
138 function setRobotpolicy( $str ) { $this->mRobotpolicy
= $str; }
139 function setHTMLTitle( $name ) {$this->mHTMLtitle
= $name; }
140 function setPageTitle( $name ) {
142 $this->mPagetitle
= $name;
143 if(!empty($action)) {
144 $taction = $this->getPageTitleActionText();
145 if( !empty( $taction ) ) {
146 $name .= " - $taction";
149 $this->setHTMLTitle( $name . " - " . wfMsg( "wikititlesuffix" ) );
151 function getHTMLTitle() { return $this->mHTMLtitle
; }
152 function getPageTitle() { return $this->mPagetitle
; }
153 function setSubtitle( $str ) { $this->mSubtitle
= $str; }
154 function getSubtitle() { return $this->mSubtitle
; }
155 function isArticle() { return $this->mIsarticle
; }
156 function setPrintable() { $this->mPrintable
= true; }
157 function isPrintable() { return $this->mPrintable
; }
158 function setSyndicated( $show = true ) { $this->mShowFeedLinks
= $show; }
159 function isSyndicated() { return $this->mShowFeedLinks
; }
160 function setOnloadHandler( $js ) { $this->mOnloadHandler
= $js; }
161 function getOnloadHandler() { return $this->mOnloadHandler
; }
162 function disable() { $this->mDoNothing
= true; }
164 function setArticleRelated( $v )
166 $this->mIsArticleRelated
= $v;
168 $this->mIsarticle
= false;
171 function setArticleFlag( $v ) {
172 $this->mIsarticle
= $v;
174 $this->mIsArticleRelated
= $v;
178 function isArticleRelated()
180 return $this->mIsArticleRelated
;
183 function getLanguageLinks() {
184 return $this->mLanguageLinks
;
186 function addLanguageLinks($newLinkArray) {
187 $this->mLanguageLinks +
= $newLinkArray;
189 function setLanguageLinks($newLinkArray) {
190 $this->mLanguageLinks
= $newLinkArray;
192 function suppressQuickbar() { $this->mSuppressQuickbar
= true; }
193 function isQuickbarSuppressed() { return $this->mSuppressQuickbar
; }
195 function addHTML( $text ) { $this->mBodytext
.= $text; }
196 function debug( $text ) { $this->mDebugtext
.= $text; }
198 function setParserOptions( $options )
200 return wfSetVar( $this->mParserOptions
, $options );
203 # First pass--just handle <nowiki> sections, pass the rest off
204 # to doWikiPass2() which does all the real work.
206 # $cacheArticle - assume this text is the main text for the given article
208 function addWikiText( $text, $linestart = true, $cacheArticle = NULL )
210 global $wgParser, $wgParserCache, $wgUser, $wgTitle;
212 $parserOutput = $wgParser->parse( $text, $wgTitle, $this->mParserOptions
, $linestart );
213 if ( $cacheArticle ) {
214 $wgParserCache->save( $parserOutput, $cacheArticle, $wgUser );
217 $this->mLanguageLinks +
= $parserOutput->getLanguageLinks();
218 $this->mCategoryLinks +
= $parserOutput->getCategoryLinks();
219 $this->addHTML( $parserOutput->getText() );
222 function tryParserCache( $article, $user ) {
223 global $wgParserCache;
224 $parserOutput = $wgParserCache->get( $article, $user );
225 if ( $parserOutput !== false ) {
226 $this->mLanguageLinks +
= $parserOutput->getLanguageLinks();
227 $this->mCategoryLinks +
= $parserOutput->getCategoryLinks();
228 $this->addHTML( $parserOutput->getText() );
235 # Set the maximum cache time on the Squid in seconds
236 function setSquidMaxage( $maxage ) {
237 $this->mSquidMaxage
= $maxage;
240 # Use enableClientCache(false) to force it to send nocache headers
241 function enableClientCache( $state ) {
242 return wfSetVar( $this->mEnableClientCache
, $state );
245 function sendCacheControl() {
246 global $wgUseSquid, $wgUseESI;
247 # FIXME: This header may cause trouble with some versions of Internet Explorer
248 header( "Vary: Accept-Encoding, Cookie" );
249 if( $this->mEnableClientCache
) {
250 if( $wgUseSquid && ! isset( $_COOKIE[ini_get( "session.name") ] ) &&
251 ! $this->isPrintable() && $this->mSquidMaxage
!= 0 )
254 # We'll purge the proxy cache explicitly, but require end user agents
255 # to revalidate against the proxy on each visit.
256 # Surrogate-Control controls our Squid, Cache-Control downstream caches
257 wfDebug( "** proxy caching with ESI; {$this->mLastModified} **\n", false );
258 # start with a shorter timeout for initial testing
259 # header( 'Surrogate-Control: max-age=2678400+2678400, content="ESI/1.0"');
260 header( 'Surrogate-Control: max-age='.$wgSquidMaxage.'+'.$this->mSquidMaxage
.', content="ESI/1.0"');
261 header( 'Cache-Control: s-maxage=0, must-revalidate, max-age=0' );
263 # We'll purge the proxy cache for anons explicitly, but require end user agents
264 # to revalidate against the proxy on each visit.
265 # IMPORTANT! The Squid needs to replace the Cache-Control header with
266 # Cache-Control: s-maxage=0, must-revalidate, max-age=0
267 wfDebug( "** local proxy caching; {$this->mLastModified} **\n", false );
268 # start with a shorter timeout for initial testing
269 # header( "Cache-Control: s-maxage=2678400, must-revalidate, max-age=0" );
270 header( 'Cache-Control: s-maxage='.$this->mSquidMaxage
.', must-revalidate, max-age=0' );
273 # We do want clients to cache if they can, but they *must* check for updates
274 # on revisiting the page.
275 wfDebug( "** private caching; {$this->mLastModified} **\n", false );
276 header( "Expires: -1" );
277 header( "Cache-Control: private, must-revalidate, max-age=0" );
279 if($this->mLastModified
) header( "Last-modified: {$this->mLastModified}" );
281 wfDebug( "** no caching **\n", false );
283 # In general, the absence of a last modified header should be enough to prevent
284 # the client from using its cache. We send a few other things just to make sure.
285 header( "Expires: -1" );
286 header( "Cache-Control: no-cache, no-store, max-age=0, must-revalidate" );
287 header( "Pragma: no-cache" );
291 # Finally, all the text has been munged and accumulated into
292 # the object, let's actually output it:
296 global $wgUser, $wgLang, $wgDebugComments, $wgCookieExpiration;
297 global $wgInputEncoding, $wgOutputEncoding, $wgLanguageCode;
298 global $wgDebugRedirects, $wgMimeType;
299 if( $this->mDoNothing
){
302 $fname = "OutputPage::output";
303 wfProfileIn( $fname );
305 $sk = $wgUser->getSkin();
307 if ( "" != $this->mRedirect
) {
308 if( substr( $this->mRedirect
, 0, 4 ) != "http" ) {
309 # Standards require redirect URLs to be absolute
311 $this->mRedirect
= $wgServer . $this->mRedirect
;
313 if( $this->mRedirectCode
== '301') {
314 if( !$wgDebugRedirects ) {
315 header("HTTP/1.1 {$this->mRedirectCode} Moved Permanently");
317 $this->mLastModified
= gmdate( "D, j M Y H:i:s" ) . " GMT";
320 $this->sendCacheControl();
322 if( $wgDebugRedirects ) {
323 $url = htmlspecialchars( $this->mRedirect
);
324 print "<html>\n<head>\n<title>Redirect</title>\n</head>\n<body>\n";
325 print "<p>Location: <a href=\"$url\">$url</a></p>\n";
326 print "</body>\n</html>\n";
328 header( "Location: {$this->mRedirect}" );
334 $this->sendCacheControl();
336 header( "Content-type: $wgMimeType; charset={$wgOutputEncoding}" );
337 header( "Content-language: {$wgLanguageCode}" );
339 $exp = time() +
$wgCookieExpiration;
340 foreach( $this->mCookies
as $name => $val ) {
341 setcookie( $name, $val, $exp, "/" );
344 $sk->outputPage( $this );
350 global $wgInputEncoding, $wgOutputEncoding, $wgLang;
351 if ( 0 == strcmp( $wgInputEncoding, $wgOutputEncoding ) ) {
354 $outs = $wgLang->iconv( $wgInputEncoding, $wgOutputEncoding, $ins );
355 if ( false === $outs ) { $outs = $ins; }
360 function setEncodings()
362 global $wgInputEncoding, $wgOutputEncoding;
363 global $wgUser, $wgLang;
365 $wgInputEncoding = strtolower( $wgInputEncoding );
367 if( $wgUser->getOption( 'altencoding' ) ) {
368 $wgLang->setAltEncoding();
372 if ( empty( $_SERVER['HTTP_ACCEPT_CHARSET'] ) ) {
373 $wgOutputEncoding = strtolower( $wgOutputEncoding );
378 # This code is unused anyway!
379 # Commenting out. --bv 2003-11-15
381 $a = explode( ",", $_SERVER['HTTP_ACCEPT_CHARSET'] );
385 foreach ( $a as $s ) {
386 if ( preg_match( "/(.*);q=(.*)/", $s, $m ) ) {
398 #if ( "*" == $bestset ) { $bestset = "iso-8859-1"; }
399 if ( "*" == $bestset ) { $bestset = $wgOutputEncoding; }
400 $wgOutputEncoding = strtolower( $bestset );
405 $wgOutputEncoding = $wgInputEncoding;
408 # Returns a HTML comment with the elapsed time since request.
409 # This method has no side effects.
410 function reportTime()
412 global $wgRequestTime;
415 list( $usec, $sec ) = explode( " ", $wgRequestTime );
416 $start = (float)$sec +
(float)$usec;
417 $elapsed = $now - $start;
419 # Use real server name if available, so we know which machine
420 # in a server farm generated the current page.
421 if ( function_exists( "posix_uname" ) ) {
422 $uname = @posix_uname
();
426 if( is_array( $uname ) && isset( $uname['nodename'] ) ) {
427 $hostname = $uname['nodename'];
429 # This may be a virtual server.
430 $hostname = $_SERVER['SERVER_NAME'];
432 $com = sprintf( "<!-- Served by %s in %01.2f secs. -->",
433 $hostname, $elapsed );
437 # Note: these arguments are keys into wfMsg(), not text!
439 function errorpage( $title, $msg )
443 $this->mDebugtext
.= "Original title: " .
444 $wgTitle->getPrefixedText() . "\n";
445 $this->setPageTitle( wfMsg( $title ) );
446 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
447 $this->setRobotpolicy( "noindex,nofollow" );
448 $this->setArticleRelated( false );
449 $this->enableClientCache( false );
451 $this->mBodytext
= "";
452 $this->addHTML( "<p>" . wfMsg( $msg ) . "</p>\n" );
453 $this->returnToMain( false );
459 function sysopRequired()
463 $this->setPageTitle( wfMsg( "sysoptitle" ) );
464 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
465 $this->setRobotpolicy( "noindex,nofollow" );
466 $this->setArticleRelated( false );
467 $this->mBodytext
= "";
469 $sk = $wgUser->getSkin();
470 $ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" );
471 $this->addHTML( wfMsg( "sysoptext", $ap ) );
472 $this->returnToMain();
475 function developerRequired()
479 $this->setPageTitle( wfMsg( "developertitle" ) );
480 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
481 $this->setRobotpolicy( "noindex,nofollow" );
482 $this->setArticleRelated( false );
483 $this->mBodytext
= "";
485 $sk = $wgUser->getSkin();
486 $ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" );
487 $this->addHTML( wfMsg( "developertext", $ap ) );
488 $this->returnToMain();
491 function loginToUse()
493 global $wgUser, $wgTitle, $wgLang;
495 $this->setPageTitle( wfMsg( "loginreqtitle" ) );
496 $this->setHTMLTitle( wfMsg( "errorpagetitle" ) );
497 $this->setRobotpolicy( "noindex,nofollow" );
498 $this->setArticleFlag( false );
499 $this->mBodytext
= "";
500 $this->addWikiText( wfMsg( "loginreqtext" ) );
502 # We put a comment in the .html file so a Sysop can diagnose the page the
504 $this->addHTML( "\n<!--" .
505 $wgLang->getNsText( $wgTitle->getNamespace() ) .
507 $wgTitle->getDBkey() . "-->" );
508 $this->returnToMain(); # Flip back to the main page after 10 seconds.
511 function databaseError( $fname, $sql, $error, $errno )
513 global $wgUser, $wgCommandLineMode;
515 $this->setPageTitle( wfMsgNoDB( "databaseerror" ) );
516 $this->setRobotpolicy( "noindex,nofollow" );
517 $this->setArticleRelated( false );
518 $this->enableClientCache( false );
520 if ( $wgCommandLineMode ) {
521 $msg = wfMsgNoDB( "dberrortextcl" );
523 $msg = wfMsgNoDB( "dberrortext" );
526 $msg = str_replace( "$1", htmlspecialchars( $sql ), $msg );
527 $msg = str_replace( "$2", htmlspecialchars( $fname ), $msg );
528 $msg = str_replace( "$3", $errno, $msg );
529 $msg = str_replace( "$4", htmlspecialchars( $error ), $msg );
531 if ( $wgCommandLineMode ||
!is_object( $wgUser )) {
535 $sk = $wgUser->getSkin();
536 $shlink = $sk->makeKnownLink( wfMsgNoDB( "searchhelppage" ),
537 wfMsgNoDB( "searchingwikipedia" ) );
538 $msg = str_replace( "$5", $shlink, $msg );
539 $this->mBodytext
= $msg;
544 function readOnlyPage( $source = null, $protected = false )
546 global $wgUser, $wgReadOnlyFile;
548 $this->setRobotpolicy( "noindex,nofollow" );
549 $this->setArticleRelated( false );
552 $this->setPageTitle( wfMsg( "viewsource" ) );
553 $this->addWikiText( wfMsg( "protectedtext" ) );
555 $this->setPageTitle( wfMsg( "readonly" ) );
556 $reason = file_get_contents( $wgReadOnlyFile );
557 $this->addWikiText( wfMsg( "readonlytext", $reason ) );
560 if( is_string( $source ) ) {
561 if( strcmp( $source, "" ) == 0 ) {
562 $source = wfMsg( "noarticletext" );
564 $rows = $wgUser->getOption( "rows" );
565 $cols = $wgUser->getOption( "cols" );
566 $text = "\n<textarea cols='$cols' rows='$rows' readonly='readonly'>" .
567 htmlspecialchars( $source ) . "\n</textarea>";
568 $this->addHTML( $text );
571 $this->returnToMain( false );
574 function fatalError( $message )
576 $this->setPageTitle( wfMsg( "internalerror" ) );
577 $this->setRobotpolicy( "noindex,nofollow" );
578 $this->setArticleRelated( false );
579 $this->enableClientCache( false );
581 $this->mBodytext
= $message;
586 function unexpectedValueError( $name, $val )
588 $this->fatalError( wfMsg( "unexpected", $name, $val ) );
591 function fileCopyError( $old, $new )
593 $this->fatalError( wfMsg( "filecopyerror", $old, $new ) );
596 function fileRenameError( $old, $new )
598 $this->fatalError( wfMsg( "filerenameerror", $old, $new ) );
601 function fileDeleteError( $name )
603 $this->fatalError( wfMsg( "filedeleteerror", $name ) );
606 function fileNotFoundError( $name )
608 $this->fatalError( wfMsg( "filenotfound", $name ) );
611 // return from error messages or notes
612 // auto: automatically redirect the user after 10 seconds
613 // returnto: page title to return to. Default is Main Page.
614 function returnToMain( $auto = true, $returnto = NULL )
616 global $wgUser, $wgOut, $wgRequest;
618 if ( $returnto == NULL ) {
619 $returnto = $wgRequest->getText( 'returnto' );
622 $sk = $wgUser->getSkin();
623 if ( "" == $returnto ) {
624 $returnto = wfMsg( "mainpage" );
626 $link = $sk->makeKnownLink( $returnto, "" );
628 $r = wfMsg( "returnto", $link );
630 $titleObj = Title
::newFromText( $returnto );
631 $wgOut->addMeta( "http:Refresh", "10;url=" . $titleObj->escapeFullURL() );
633 $wgOut->addHTML( "\n<p>$r</p>\n" );
636 # This function takes the existing and broken links for the page
637 # and uses the first 10 of them for META keywords
638 function addMetaTags ()
640 global $wgLinkCache , $wgOut ;
641 $good = array_keys ( $wgLinkCache->mGoodLinks
) ;
642 $bad = array_keys ( $wgLinkCache->mBadLinks
) ;
643 $a = array_merge ( $good , $bad ) ;
644 $a = array_slice ( $a , 0 , 10 ) ; # 10 keywords max
645 $a = implode ( "," , $a ) ;
650 $a = htmlspecialchars(preg_replace(array_keys($strip), array_values($strip),$a ));
652 $wgOut->addMeta ( "KEYWORDS" , $a ) ;
655 /* private */ function headElement()
657 global $wgDocType, $wgDTD, $wgLanguageCode, $wgOutputEncoding, $wgMimeType;
658 global $wgUser, $wgLang, $wgRequest;
660 $xml = ($wgMimeType == 'text/xml');
662 $ret = "<" . "?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
667 $ret .= "<!DOCTYPE html PUBLIC \"$wgDocType\"\n \"$wgDTD\">\n";
669 if ( "" == $this->mHTMLtitle
) {
670 $this->mHTMLtitle
= wfMsg( "pagetitle", $this->mPagetitle
);
673 $xmlbits = "xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\"";
677 $rtl = $wgLang->isRTL() ?
" dir='RTL'" : "";
678 $ret .= "<html $xmlbits lang=\"$wgLanguageCode\" $rtl>\n";
679 $ret .= "<head>\n<title>" . htmlspecialchars( $this->mHTMLtitle
) . "</title>\n";
680 array_push( $this->mMetatags
, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) );
682 $ret .= $this->getHeadLinks();
684 if( $this->isPrintable() ) {
687 $media = "media='print'";
689 $printsheet = htmlspecialchars( "$wgStylePath/wikiprintable.css" );
690 $ret .= "<link rel='stylesheet' type='text/css' $media href='$printsheet' />\n";
692 $sk = $wgUser->getSkin();
693 $ret .= $sk->getHeadScripts();
694 $ret .= $this->mScripts
;
695 $ret .= $sk->getUserStyles();
701 function getHeadLinks() {
702 global $wgRequest, $wgStylePath;
704 foreach ( $this->mMetatags
as $tag ) {
705 if ( 0 == strcasecmp( "http:", substr( $tag[0], 0, 5 ) ) ) {
707 $tag[0] = substr( $tag[0], 5 );
711 $ret .= "<meta $a=\"{$tag[0]}\" content=\"{$tag[1]}\" />\n";
713 $p = $this->mRobotpolicy
;
714 if ( "" == $p ) { $p = "index,follow"; }
715 $ret .= "<meta name=\"robots\" content=\"$p\" />\n";
717 if ( count( $this->mKeywords
) > 0 ) {
722 $ret .= "<meta name=\"keywords\" content=\"" .
723 htmlspecialchars(preg_replace(array_keys($strip), array_values($strip),implode( ",", $this->mKeywords
))) . "\" />\n";
725 foreach ( $this->mLinktags
as $tag ) {
727 foreach( $tag as $attr => $val ) {
728 $ret .= " $attr=\"" . htmlspecialchars( $val ) . "\"";
732 if( $this->isSyndicated() ) {
733 # FIXME: centralize the mime-type and name information in Feed.php
734 $link = $wgRequest->escapeAppendQuery( "feed=rss" );
735 $ret .= "<link rel='alternate' type='application/rss+xml' title='RSS 2.0' href='$link' />\n";
736 $link = $wgRequest->escapeAppendQuery( "feed=atom" );
737 $ret .= "<link rel='alternate' type='application/rss+atom' title='Atom 0.3' href='$link' />\n";
739 # FIXME: get these working
740 # $fix = htmlspecialchars( $wgStylePath . "/ie-png-fix.js" );
741 # $ret .= "<!--[if gte IE 5.5000]><script type='text/javascript' src='$fix'></script><![endif]-->";