summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-07-30 18:48:02 +0200
committerChristopher Smith <chris@jalakai.co.uk>2013-07-30 18:48:02 +0200
commitfc498a423a295d14127239e3838b6fb7bb0c8529 (patch)
tree5137fa6751452a0928e328b278a61395c56ea30d /inc
parente4207845851edfe9c1f2382b181b5f11f3073204 (diff)
downloadrpg-fc498a423a295d14127239e3838b6fb7bb0c8529.tar.gz
rpg-fc498a423a295d14127239e3838b6fb7bb0c8529.tar.bz2
FS#2770 - prevent <file> and <code> syntax regex matching token names which start '<file' or '<code'
Diffstat (limited to 'inc')
-rw-r--r--inc/parser/parser.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index 6aef3fda5..4af1cd333 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -555,7 +555,7 @@ class Doku_Parser_Mode_preformatted extends Doku_Parser_Mode {
class Doku_Parser_Mode_code extends Doku_Parser_Mode {
function connectTo($mode) {
- $this->Lexer->addEntryPattern('<code(?=.*</code>)',$mode,'code');
+ $this->Lexer->addEntryPattern('<code\b(?=.*</code>)',$mode,'code');
}
function postConnect() {
@@ -571,7 +571,7 @@ class Doku_Parser_Mode_code extends Doku_Parser_Mode {
class Doku_Parser_Mode_file extends Doku_Parser_Mode {
function connectTo($mode) {
- $this->Lexer->addEntryPattern('<file(?=.*</file>)',$mode,'file');
+ $this->Lexer->addEntryPattern('<file\b(?=.*</file>)',$mode,'file');
}
function postConnect() {