Ticket #2531032 (closed defect)

Reporter


Satyam
Opened: 08/31/11
Last modified: 12/12/12
Status: closed
Type: defect
Resolution: fixed

Owner


Luke Smith
Target Release: BACKLOG
Priority: P3 (normal)
Summary: Substitute should check for undefined values.
Description:

Where it says:

} else if (!L.isString(v) && !L.isNumber(v)) {

there is no reason for the replacement value not to be null, true or false, they can all represented as strings. What it should check for is undefined:

} else if (L.isUndefined(v)) {

Also, it would be good to provide some sort of escape for including curly braces. As an extension of what I currently do:

Y.substitute(" {LBRACE} ", {LBRACE:'{',RBRACE:'}'});

those two identifiers could be built-in adding right before the first for(;;) loop:

o = Y.merge({LBRACE:'{',RBRACE:'}'}, o);

Type: defect Observed in Version: 3.4.0
Component: Substitute Severity: S3 (normal)
Assigned To: Luke Smith Target Release: BACKLOG
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Change History

Luke Smith

YUI Contributor

Posted: 08/31/11
  • milestone changed to 3.NEXT
  • status changed from new to accepted

Jenny Donnelly

YUI Developer

Posted: 09/19/12
  • milestone changed from 3.NEXT to BACKLOG

Moving from 3.NEXT to BACKLOG.

Satyam

YUI Contributor

Posted: 12/12/12
  • resolution changed to fixed
  • status changed from accepted to closed