mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 11:36:20 +05:30
Fix editor tags HTML entities
This commit is contained in:
parent
cf7329dce8
commit
f6a8caa379
2 changed files with 18 additions and 2 deletions
|
|
@ -42,11 +42,19 @@ if (file_exists($field_file)) {
|
|||
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/jquery-ui.css">
|
||||
<script>
|
||||
$( function() {
|
||||
// Decode HTML entities
|
||||
function decodeHtml(html) {
|
||||
var txt = document.createElement("textarea");
|
||||
txt.innerHTML = html;
|
||||
return txt.value;
|
||||
}
|
||||
|
||||
var availableTags = [
|
||||
<?php foreach ($tags as $tag => $count):?>
|
||||
"<?php echo tag_i18n($tag) ?>",
|
||||
<?php endforeach;?>
|
||||
];
|
||||
].map(decodeHtml); // Decoding all tags
|
||||
|
||||
function split( val ) {
|
||||
return val.split( /,\s*/ );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,11 +88,19 @@ if (file_exists($field_file)) {
|
|||
<link rel="stylesheet" href="<?php echo site_url() ?>system/resources/css/jquery-ui.css">
|
||||
<script>
|
||||
$( function() {
|
||||
// Decode HTML entities
|
||||
function decodeHtml(html) {
|
||||
var txt = document.createElement("textarea");
|
||||
txt.innerHTML = html;
|
||||
return txt.value;
|
||||
}
|
||||
|
||||
var availableTags = [
|
||||
<?php foreach ($tags as $tag => $count):?>
|
||||
"<?php echo tag_i18n($tag) ?>",
|
||||
<?php endforeach;?>
|
||||
];
|
||||
].map(decodeHtml); // Decoding all tags
|
||||
|
||||
function split( val ) {
|
||||
return val.split( /,\s*/ );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue