Skip to content

Commit

Permalink
JS fix double encoding & inside <code>
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed Dec 7, 2024
1 parent 5f08c80 commit 2fff689
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions assets/js/plugins.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/plugins.min.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion assets/js/warehouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ var MarkDownToHTML = function(target) {

$(target + '.markdown-to-html').html(function(i, txt) {
var mdc = GetMDConverter(),
md = mdc( txt.replace(/&gt;/g, '>') ); // Fix MD blockquotes, decode `>`
// Fix MD blockquotes, decode `>` + fix double encoding `&` inside `<code>`
md = mdc( txt.replace(/&gt;/g, '>').replace(/&amp;/g, '&') );

// Add paragraph to text.
var txtP = '<p>' + txt + '</p>';
Expand Down

0 comments on commit 2fff689

Please sign in to comment.