ultraq / thymeleafjs

A basic implementation of the Thymeleaf templating engine in JavaScript
Apache License 2.0
52 stars 8 forks source link

Is not possible to specify several attributes #19

Open rogerdielrton opened 6 years ago

rogerdielrton commented 6 years ago

Hello. The execution of the following code fails function multiAttrTest(callback) { var tptEng = new thymeleaf.TemplateEngine(); var tptTxt = '<a thjs:attr="href=${webPage}, target=${target}">This is a test</a>'; var data = {webPage: 'https://www.google.com', target: '_blank'}; tptEng.process(tptTxt, data).then(function (result) { console.log(result); callback(); }).catch(function (error) { callback(error); }); } This is the error trace:

InvalidCharacterError at Object.exports.name (/node-thymeleaf-mytests/node_modules/jsdom/lib/jsdom/living/helpers/validate-names.js:10:11)