Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CentralNic
parsedown
Commits
2a5f9954
Commit
2a5f9954
authored
May 01, 2014
by
Emanuil Rusev
Browse files
resolve #162
parent
e373391e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Parsedown.php
View file @
2a5f9954
...
...
@@ -470,9 +470,18 @@ class Parsedown
return
$Block
;
}
$
string
=
htmlspecialchars
(
$Line
[
'body'
],
ENT_NOQUOTES
,
'UTF-8'
)
;
$
Block
[
'element'
][
'text'
][
'text'
]
.
=
"
\n
"
.
$Line
[
'body'
];
;
$Block
[
'element'
][
'text'
][
'text'
]
.
=
"
\n
"
.
$string
;;
return
$Block
;
}
protected
function
completeFencedCode
(
$Block
)
{
$text
=
$Block
[
'element'
][
'text'
][
'text'
];
$text
=
htmlspecialchars
(
$text
,
ENT_NOQUOTES
,
'UTF-8'
);
$Block
[
'element'
][
'text'
][
'text'
]
=
$text
;
return
$Block
;
}
...
...
@@ -762,7 +771,6 @@ class Parsedown
if
(
$Line
[
'indent'
]
>=
4
)
{
$text
=
substr
(
$Line
[
'body'
],
4
);
$text
=
htmlspecialchars
(
$text
,
ENT_NOQUOTES
,
'UTF-8'
);
$Block
=
array
(
'element'
=>
array
(
...
...
@@ -793,7 +801,6 @@ class Parsedown
$Block
[
'element'
][
'text'
][
'text'
]
.
=
"
\n
"
;
$text
=
substr
(
$Line
[
'body'
],
4
);
$text
=
htmlspecialchars
(
$text
,
ENT_NOQUOTES
,
'UTF-8'
);
$Block
[
'element'
][
'text'
][
'text'
]
.
=
$text
;
...
...
@@ -801,6 +808,17 @@ class Parsedown
}
}
protected
function
completeCodeBlock
(
$Block
)
{
$text
=
$Block
[
'element'
][
'text'
][
'text'
];
$text
=
htmlspecialchars
(
$text
,
ENT_NOQUOTES
,
'UTF-8'
);
$Block
[
'element'
][
'text'
][
'text'
]
=
$text
;
return
$Block
;
}
#
# ~
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment