Issue #3419763 by Tom Konda: Replace deprecated String.prototype.substr() with String.prototype.substring() (cherry picked from commit 378f477a)