Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ref #124 - Convert inputs of entity HTML to simble #125

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ Define callback in settings. Callbacks execute on different events.
- `beforeRender` : Triggered before rendering going to call.
- `beforeRecordRender` : Triggered for each JSON object record at time of rendering.
- `afterFilter` : Triggered after filtering event.
- `beforeChangePage` : Triggered before change page of paginator.
- `afterChangePage` : Triggered after change page of paginator.

i.e.,

Expand All @@ -189,6 +191,12 @@ i.e.,
},
afterFilter: function(result){
// i.e Update result counter, update google map markers.
},
beforeChangePage: function(result) {
// i.e Delete a class to item.
},
afterChangePage: function(result) {
// i.e Insert a class to item.
}
};
```
Expand Down
10 changes: 10 additions & 0 deletions dist/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,17 @@
.replace(/\//g, '/');
};

var convertHtmlEntityToStr = function(string) {
return (''+string).replace(/&/g, '&')
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&quot;/g, '\"')
.replace(/&#x27;/g, '\'')
.replace(/&#x2F;/g, '\/');
};

function templateBuilder(str, data) {
str = convertHtmlEntityToStr(str);
var c = templateSettings;
var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
'with(obj||{}){__p.push(\'' +
Expand Down