basis.template: fix html token parsing (take in account digits at the ending)