Skip to content

Commit f6a8caa

Browse files
committed
Fix editor tags HTML entities
1 parent cf7329d commit f6a8caa

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

system/admin/views/add-content.html.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,19 @@
4242
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/jquery-ui.css">
4343
<script>
4444
$( function() {
45+
// Decode HTML entities
46+
function decodeHtml(html) {
47+
var txt = document.createElement("textarea");
48+
txt.innerHTML = html;
49+
return txt.value;
50+
}
51+
4552
var availableTags = [
4653
<?php foreach ($tags as $tag => $count):?>
4754
"<?php echo tag_i18n($tag) ?>",
4855
<?php endforeach;?>
49-
];
56+
].map(decodeHtml); // Decoding all tags
57+
5058
function split( val ) {
5159
return val.split( /,\s*/ );
5260
}

system/admin/views/edit-content.html.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,19 @@
8888
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/jquery-ui.css">
8989
<script>
9090
$( function() {
91+
// Decode HTML entities
92+
function decodeHtml(html) {
93+
var txt = document.createElement("textarea");
94+
txt.innerHTML = html;
95+
return txt.value;
96+
}
97+
9198
var availableTags = [
9299
<?php foreach ($tags as $tag => $count):?>
93100
"<?php echo tag_i18n($tag) ?>",
94101
<?php endforeach;?>
95-
];
102+
].map(decodeHtml); // Decoding all tags
103+
96104
function split( val ) {
97105
return val.split( /,\s*/ );
98106
}

0 commit comments

Comments
 (0)