[Scummvm-cvs-logs] SF.net SVN: scummvm:[40826] web/trunk/include/Models/FAQModel.php

fredrik_w at users.sourceforge.net fredrik_w at users.sourceforge.net
Sat May 23 22:36:51 CEST 2009


Revision: 40826
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40826&view=rev
Author:   fredrik_w
Date:     2009-05-23 20:36:51 +0000 (Sat, 23 May 2009)

Log Message:
-----------
Fix the regexp rules so that we ignore the attributes on some XML-elements that are non-relevant to the website.

Modified Paths:
--------------
    web/trunk/include/Models/FAQModel.php

Modified: web/trunk/include/Models/FAQModel.php
===================================================================
--- web/trunk/include/Models/FAQModel.php	2009-05-23 20:35:12 UTC (rev 40825)
+++ web/trunk/include/Models/FAQModel.php	2009-05-23 20:36:51 UTC (rev 40826)
@@ -38,9 +38,9 @@
 			'/<simpara>(.+)<\/simpara>/isU',
 			'/<emphasis>(.+)<\/emphasis>/isU',
 			'/<envar>(.+)<\/envar>/isU',
-			'/<command>(.+)<\/command>/isU',
+			'/<command(?:\s+[^>]+)?>(.+)<\/command>/isU',
 			'/<blockquote>(.+)<\/blockquote>/isU',
-			'/<programlisting>(.+)<\/programlisting>/isU',
+			'/<programlisting(?:\s+[^>]+)?>(.+)<\/programlisting>/isU',
 			'/<quote>(.+)<\/quote>/isU',
 			'/<xref linkend="(.+)"\s+endterm=".+"\/>/isU',
 			'/(&(?:lt|gt|quot);)/is',
@@ -62,6 +62,7 @@
 		$data = preg_replace($pattern, $replace, $data);
 		/* Remove this weird character as it displays as À in Firefox. */
 		$data = str_replace(chr(194), '', $data);
+
 		/* Now parse the data. */
 		$parser = new XMLParser();
 		$a = $parser->parseByData($data);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list