Fix a javascript error when `input` is an integer (substr func is only for strings)
Merge branch '13.09'