Skip to content

Commit

Permalink
#2 support of the php html_entities function for javascript implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
1stthomas committed May 30, 2021
1 parent 1c280a8 commit d5c0e00
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ private function registerAssets()
['version' => '0.0.1', 'minify' => true, 'combine' => true],
$this
);
$al->register(
'javascript',
'ht7-extenders',
'js/ht7.extenders.js',
['version' => '0.0.1', 'minify' => true, 'combine' => true],
$this
);

$al->registerGroup(
'ht7-widgets/body-overlay',
Expand Down
8 changes: 8 additions & 0 deletions js/ht7.extenders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Proting of the php html_entites().
String.prototype.htmlEntities = function() {
return document.createElement('p').textContent.innerHTML;

// var p = document.createElement('p');
// p.textContent = this;
// return p.innerHTML;
};

0 comments on commit d5c0e00

Please sign in to comment.