PageRenderTime 42ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/mambots/content/geshi/geshi/html4strict.php

https://bitbucket.org/dgough/annamaria-daneswood-25102012
PHP | 256 lines | 203 code | 2 blank | 51 comment | 0 complexity | e19a41fb64e734e5b7f1ee722f3776fd MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
  1. <?php
  2. /*************************************************************************************
  3. * html4strict.php
  4. * ---------------
  5. * Author: Nigel McNie (oracle.shinoda@gmail.com)
  6. * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
  7. * Release Version: 1.0.7.8
  8. * CVS Revision Version: $Revision: 2968 $
  9. * Date Started: 2004/07/10
  10. * Last Modified: $Date: 2006/02/25 00:46:33 $
  11. *
  12. * HTML 4.01 strict language file for GeSHi.
  13. *
  14. * CHANGES
  15. * -------
  16. * 2005/12/28 (1.0.4)
  17. * - Removed escape character for strings
  18. * 2004/11/27 (1.0.3)
  19. * - Added support for multiple object splitters
  20. * 2004/10/27 (1.0.2)
  21. * - Added support for URLs
  22. * 2004/08/05 (1.0.1)
  23. * - Added INS and DEL
  24. * - Removed the background colour from tags' styles
  25. * 2004/07/14 (1.0.0)
  26. * - First Release
  27. *
  28. * TODO (updated 2004/11/27)
  29. * -------------------------
  30. * * Check that only HTML4 strict attributes are highlighted
  31. * * Eliminate empty tags that aren't allowed in HTML4 strict
  32. * * Split to several files - html4trans, xhtml1 etc
  33. *
  34. *************************************************************************************
  35. *
  36. * This file is part of GeSHi.
  37. *
  38. * GeSHi is free software; you can redistribute it and/or modify
  39. * it under the terms of the GNU General Public License as published by
  40. * the Free Software Foundation; either version 2 of the License, or
  41. * (at your option) any later version.
  42. *
  43. * GeSHi is distributed in the hope that it will be useful,
  44. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  45. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  46. * GNU General Public License for more details.
  47. *
  48. * You should have received a copy of the GNU General Public License
  49. * along with GeSHi; if not, write to the Free Software
  50. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  51. *
  52. ************************************************************************************/
  53. $language_data = array (
  54. 'LANG_NAME' => 'HTML',
  55. 'COMMENT_SINGLE' => array(),
  56. 'COMMENT_MULTI' => array('<!--' => '-->'),
  57. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  58. 'QUOTEMARKS' => array("'", '"'),
  59. 'ESCAPE_CHAR' => '',
  60. 'KEYWORDS' => array(
  61. 1 => array(
  62. ),
  63. 2 => array(
  64. '&lt;a&gt;', '&lt;abbr&gt;', '&lt;acronym&gt;', '&lt;address&gt;', '&lt;applet&gt;',
  65. '&lt;a', '&lt;abbr', '&lt;acronym', '&lt;address', '&lt;applet',
  66. '&lt;/a&gt;', '&lt;/abbr&gt;', '&lt;/acronym&gt;', '&lt;/address&gt;', '&lt;/applet&gt;',
  67. '&lt;/a', '&lt;/abbr', '&lt;/acronym', '&lt;/address', '&lt;/applet',
  68. '&lt;base&gt;', '&lt;basefont&gt;', '&lt;bdo&gt;', '&lt;big&gt;', '&lt;blockquote&gt;', '&lt;body&gt;', '&lt;br&gt;', '&lt;button&gt;', '&lt;b&gt;',
  69. '&lt;base', '&lt;basefont', '&lt;bdo', '&lt;big', '&lt;blockquote', '&lt;body', '&lt;br', '&lt;button', '&lt;b',
  70. '&lt;/base&gt;', '&lt;/basefont&gt;', '&lt;/bdo&gt;', '&lt;/big&gt;', '&lt;/blockquote&gt;', '&lt;/body&gt;', '&lt;/br&gt;', '&lt;/button&gt;', '&lt;/b&gt;',
  71. '&lt;/base', '&lt;/basefont', '&lt;/bdo', '&lt;/big', '&lt;/blockquote', '&lt;/body', '&lt;/br', '&lt;/button', '&lt;/b',
  72. '&lt;caption&gt;', '&lt;center&gt;', '&lt;cite&gt;', '&lt;code&gt;', '&lt;colgroup&gt;', '&lt;col&gt;',
  73. '&lt;caption', '&lt;center', '&lt;cite', '&lt;code', '&lt;colgroup', '&lt;col',
  74. '&lt;/caption&gt;', '&lt;/center&gt;', '&lt;/cite&gt;', '&lt;/code&gt;', '&lt;/colgroup&gt;', '&lt;/col&gt;',
  75. '&lt;/caption', '&lt;/center', '&lt;/cite', '&lt;/code', '&lt;/colgroup', '&lt;/col',
  76. '&lt;dd&gt;', '&lt;del&gt;', '&lt;dfn&gt;', '&lt;dir&gt;', '&lt;div&gt;', '&lt;dl&gt;', '&lt;dt&gt;',
  77. '&lt;dd', '&lt;del', '&lt;dfn', '&lt;dir', '&lt;div', '&lt;dl', '&lt;dt',
  78. '&lt;/dd&gt;', '&lt;/del&gt;', '&lt;/dfn&gt;', '&lt;/dir&gt;', '&lt;/div&gt;', '&lt;/dl&gt;', '&lt;/dt&gt;',
  79. '&lt;/dd', '&lt;/del', '&lt;/dfn', '&lt;/dir', '&lt;/div', '&lt;/dl', '&lt;/dt',
  80. '&lt;em&gt;',
  81. '&lt;em',
  82. '&lt;/em&gt;',
  83. '&lt;/em',
  84. '&lt;fieldset&gt;', '&lt;font&gt;', '&lt;form&gt;', '&lt;frame&gt;', '&lt;frameset&gt;',
  85. '&lt;fieldset', '&lt;font', '&lt;form', '&lt;frame', '&lt;frameset',
  86. '&lt;/fieldset&gt;', '&lt;/font&gt;', '&lt;/form&gt;', '&lt;/frame&gt;', '&lt;/frameset&gt;',
  87. '&lt;/fieldset', '&lt;/font', '&lt;/form', '&lt;/frame', '&lt;/frameset',
  88. '&lt;h1&gt;', '&lt;h2&gt;', '&lt;h3&gt;', '&lt;h4&gt;', '&lt;h5&gt;', '&lt;h6&gt;', '&lt;head&gt;', '&lt;hr&gt;', '&lt;html&gt;',
  89. '&lt;h1', '&lt;h2', '&lt;h3', '&lt;h4', '&lt;h5', '&lt;h6', '&lt;head', '&lt;hr', '&lt;html',
  90. '&lt;/h1&gt;', '&lt;/h2&gt;', '&lt;/h3&gt;', '&lt;/h4&gt;', '&lt;/h5&gt;', '&lt;/h6&gt;', '&lt;/head&gt;', '&lt;/hr&gt;', '&lt;/html&gt;',
  91. '&lt;/h1', '&lt;/h2', '&lt;/h3', '&lt;/h4', '&lt;/h5', '&lt;/h6', '&lt;/head', '&lt;/hr', '&lt;/html',
  92. '&lt;iframe&gt;', '&lt;ilayer&gt;', '&lt;img&gt;', '&lt;input&gt;', '&lt;ins&gt;', '&lt;isindex&gt;', '&lt;i&gt;',
  93. '&lt;iframe', '&lt;ilayer', '&lt;img', '&lt;input', '&lt;ins', '&lt;isindex', '&lt;i',
  94. '&lt;/iframe&gt;', '&lt;/ilayer&gt;', '&lt;/img&gt;', '&lt;/input&gt;', '&lt;/ins&gt;', '&lt;/isindex&gt;', '&lt;/i&gt;',
  95. '&lt;/iframe', '&lt;/ilayer', '&lt;/img', '&lt;/input', '&lt;/ins', '&lt;/isindex', '&lt;/i',
  96. '&lt;kbd&gt;',
  97. '&lt;kbd',
  98. '&t;/kbd&gt;',
  99. '&lt;/kbd',
  100. '&lt;label&gt;', '&lt;legend&gt;', '&lt;link&gt;', '&lt;li&gt;',
  101. '&lt;label', '&lt;legend', '&lt;link', '&lt;li',
  102. '&lt;/label&gt;', '&lt;/legend&gt;', '&lt;/link&gt;', '&lt;/li&gt;',
  103. '&lt;/label', '&lt;/legend', '&lt;/link', '&lt;/li',
  104. '&lt;map&gt;', '&lt;meta&gt;',
  105. '&lt;map', '&lt;meta',
  106. '&lt;/map&gt;', '&lt;/meta&gt;',
  107. '&lt;/map', '&lt;/meta',
  108. '&lt;noframes&gt;', '&lt;noscript&gt;',
  109. '&lt;noframes', '&lt;noscript',
  110. '&lt;/noframes&gt;', '&lt;/noscript&gt;',
  111. '&lt;/noframes', '&lt;/noscript',
  112. '&lt;object&gt;', '&lt;ol&gt;', '&lt;optgroup&gt;', '&lt;option&gt;',
  113. '&lt;object', '&lt;ol', '&lt;optgroup', '&lt;option',
  114. '&lt;/object&gt;', '&lt;/ol&gt;', '&lt;/optgroup&gt;', '&lt;/option&gt;',
  115. '&lt;/object', '&lt;/ol', '&lt;/optgroup', '&lt;/option',
  116. '&lt;param&gt;', '&lt;pre&gt;', '&lt;p&gt;',
  117. '&lt;param', '&lt;pre', '&lt;p',
  118. '&lt;/param&gt;', '&lt;/pre&gt;', '&lt;/p&gt;',
  119. '&lt;/param', '&lt;/pre', '&lt;/p',
  120. '&lt;q&gt;',
  121. '&lt;q',
  122. '&lt;/q&gt;',
  123. '&lt;/q',
  124. '&lt;samp&gt;', '&lt;script&gt;', '&lt;select&gt;', '&lt;small&gt;', '&lt;span&gt;', '&lt;strike&gt;', '&lt;strong&gt;', '&lt;style&gt;', '&lt;sub&gt;', '&lt;sup&gt;', '&lt;s&gt;',
  125. '&lt;samp', '&lt;script', '&lt;select', '&lt;small', '&lt;span', '&lt;strike', '&lt;strong', '&lt;style', '&lt;sub', '&lt;sup', '&lt;s',
  126. '&lt;/samp&gt;', '&lt;/script&gt;', '&lt;/select&gt;', '&lt;/small&gt;', '&lt;/span&gt;', '&lt;/strike&gt;', '&lt;/strong&gt;', '&lt;/style&gt;', '&lt;/sub&gt;', '&lt;/sup&gt;', '&lt;/s&gt;',
  127. '&lt;/samp', '&lt;/script', '&lt;/select', '&lt;/small', '&lt;/span', '&lt;/strike', '&lt;/strong', '&lt;/style', '&lt;/sub', '&lt;/sup', '&lt;/s',
  128. '&lt;table&gt;', '&lt;tbody&gt;', '&lt;td&gt;', '&lt;textarea&gt;', '&lt;text&gt;', '&lt;tfoot&gt;', '&lt;thead&gt;', '&lt;th&gt;', '&lt;title&gt;', '&lt;tr&gt;', '&lt;tt&gt;',
  129. '&lt;table', '&lt;tbody', '&lt;td', '&lt;textarea', '&lt;text', '&lt;tfoot', '&lt;tfoot', '&lt;thead', '&lt;th', '&lt;title', '&lt;tr', '&lt;tt',
  130. '&lt;/table&gt;', '&lt;/tbody&gt;', '&lt;/td&gt;', '&lt;/textarea&gt;', '&lt;/text&gt;', '&lt;/tfoot&gt;', '&lt;/thead', '&lt;/tfoot', '&lt;/th&gt;', '&lt;/title&gt;', '&lt;/tr&gt;', '&lt;/tt&gt;',
  131. '&lt;/table', '&lt;/tbody', '&lt;/td', '&lt;/textarea', '&lt;/text', '&lt;/tfoot', '&lt;/tfoot', '&lt;/thead', '&lt;/th', '&lt;/title', '&lt;/tr', '&lt;/tt',
  132. '&lt;ul&gt;', '&lt;u&gt;',
  133. '&lt;ul', '&lt;u',
  134. '&lt;/ul&gt;', '&lt;/ul&gt;',
  135. '&lt;/ul', '&lt;/u',
  136. '&lt;var&gt;',
  137. '&lt;var',
  138. '&lt;/var&gt;',
  139. '&lt;/var',
  140. '&gt;', '&lt;'
  141. ),
  142. 3 => array(
  143. 'abbr', 'accept-charset', 'accept', 'accesskey', 'action', 'align', 'alink', 'alt', 'archive', 'axis',
  144. 'background', 'bgcolor', 'border',
  145. 'cellpadding', 'cellspacing', 'char', 'char', 'charoff', 'charset', 'checked', 'cite', 'class', 'classid', 'clear', 'code', 'codebase', 'codetype', 'color', 'cols', 'colspan', 'compact', 'content', 'coords',
  146. 'data', 'datetime', 'declare', 'defer', 'dir', 'disabled',
  147. 'enctype',
  148. 'face', 'for', 'frame', 'frameborder',
  149. 'headers', 'height', 'href', 'hreflang', 'hspace', 'http-equiv',
  150. 'id', 'ismap',
  151. 'label', 'lang', 'language', 'link', 'longdesc',
  152. 'marginheight', 'marginwidth', 'maxlength', 'media', 'method', 'multiple',
  153. 'name', 'nohref', 'noresize', 'noshade', 'nowrap',
  154. 'object', 'onblur', 'onchange', 'onclick', 'ondblclick', 'onfocus', 'onkeydown', 'onkeypress', 'onkeyup', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onreset', 'onselect', 'onsubmit', 'onunload',
  155. 'profile', 'prompt',
  156. 'readonly', 'rel', 'rev', 'rowspan', 'rows', 'rules',
  157. 'scheme', 'scope', 'scrolling', 'selected', 'shape', 'size', 'span', 'src', 'standby', 'start', 'style', 'summary',
  158. 'tabindex', 'target', 'text', 'title', 'type',
  159. 'usemap',
  160. 'valign', 'value', 'valuetype', 'version', 'vlink', 'vspace',
  161. 'width'
  162. )
  163. ),
  164. 'SYMBOLS' => array(
  165. '/', '='
  166. ),
  167. 'CASE_SENSITIVE' => array(
  168. GESHI_COMMENTS => false,
  169. 1 => false,
  170. 2 => false,
  171. 3 => false,
  172. ),
  173. 'STYLES' => array(
  174. 'KEYWORDS' => array(
  175. 1 => 'color: #b1b100;',
  176. 2 => 'color: #000000; font-weight: bold;',
  177. 3 => 'color: #000066;'
  178. ),
  179. 'COMMENTS' => array(
  180. 'MULTI' => 'color: #808080; font-style: italic;'
  181. ),
  182. 'ESCAPE_CHAR' => array(
  183. 0 => 'color: #000099; font-weight: bold;'
  184. ),
  185. 'BRACKETS' => array(
  186. 0 => 'color: #66cc66;'
  187. ),
  188. 'STRINGS' => array(
  189. 0 => 'color: #ff0000;'
  190. ),
  191. 'NUMBERS' => array(
  192. 0 => 'color: #cc66cc;'
  193. ),
  194. 'METHODS' => array(
  195. ),
  196. 'SYMBOLS' => array(
  197. 0 => 'color: #66cc66;'
  198. ),
  199. 'SCRIPT' => array(
  200. 0 => 'color: #00bbdd;',
  201. 1 => 'color: #ddbb00;',
  202. 2 => 'color: #009900;'
  203. ),
  204. 'REGEXPS' => array(
  205. )
  206. ),
  207. 'URLS' => array(
  208. 1 => '',
  209. 2 => 'http://december.com/html/4/element/{FNAME}.html',
  210. 3 => ''
  211. ),
  212. 'OOLANG' => false,
  213. 'OBJECT_SPLITTERS' => array(
  214. ),
  215. 'REGEXPS' => array(
  216. ),
  217. 'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
  218. 'SCRIPT_DELIMITERS' => array(
  219. 0 => array(
  220. '<!DOCTYPE' => '>'
  221. ),
  222. 1 => array(
  223. '&' => ';'
  224. ),
  225. 2 => array(
  226. '<' => '>'
  227. )
  228. ),
  229. 'HIGHLIGHT_STRICT_BLOCK' => array(
  230. 0 => false,
  231. 1 => false,
  232. 2 => true
  233. )
  234. );
  235. ?>