Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
2
2015-12-uni-ffm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CmS
2015-12-uni-ffm
Commits
78b9bb43
Commit
78b9bb43
authored
12 years ago
by
Hakim El Hattab
Browse files
Options
Downloads
Patches
Plain Diff
disable html entity escapes in showdown (cloes #153 & #152)
parent
73706ad0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/js/showdown.js
+6
-3
6 additions, 3 deletions
lib/js/showdown.js
with
6 additions
and
3 deletions
lib/js/showdown.js
+
6
−
3
View file @
78b9bb43
...
...
@@ -992,13 +992,16 @@ var _EncodeCode = function(text) {
// The point is that in code, these characters are literals,
// and lose their special Markdown meanings.
//
// Hakim: Escaping these causes issues in code blocks
// Encode all ampersands; HTML entities are not
// entities within a Markdown code span.
text
=
text
.
replace
(
/&/g
,
"
&
"
);
//
text = text.replace(/&/g,"&");
// Do the angle bracket song and dance:
text
=
text
.
replace
(
/</g
,
"
<
"
);
text
=
text
.
replace
(
/>/g
,
"
>
"
);
//
text = text.replace(/</g,"<");
//
text = text.replace(/>/g,">");
// Now, escape characters that are magic in Markdown:
text
=
escapeCharacters
(
text
,
"
\
*_{}[]
\\
"
,
false
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment