Ticket #7751 (new defect)
dojox.dtl.filter.strings.slugify bug
| Reported by: | rsaccon | Owned by: | pottedmeat |
|---|---|---|---|
| Priority: | normal | Milestone: | tbd |
| Component: | DojoX DTL | Version: | 1.2beta |
| Severity: | normal | Keywords: | dojox dtl slugify |
| Cc: |
Description
the dtl slugify does not work in my particular case when used inside templates loaded via include tag (tested in firefox 3.0.3).
Original source for slugify filter:
slugify: function(value){
value = value.replace(/[\w\s-]/g, "").toLowerCase(); return value.replace(/[\-\s]+/g, "-");
}
Problem:
typeof(value) is "object"
Workround:
slugify: function(value){
// summary: Converts to lowercase, removes // non-alpha chars and converts spaces to hyphens value = value.toString().replace(/[\w\s-]/g, "").toLowerCase(); return value.replace(/[\-\s]+/g, "-");
}
Change History
Note: See
TracTickets for help on using
tickets.