Skip to content

Commit

Permalink
Fix display issues with special HTML characters
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufortfrancois committed Mar 13, 2017
1 parent 6c7b2b6 commit 34eb9c2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions physical-web/url-validator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@
log('Snap!', text, 'error');
return enableButton();
}
var text = '<b>URL</b><a href="' + data.results[0].resolvedUrl + '">' + data.results[0].resolvedUrl + '</a><br/>' +
'<b>Title</b>' + data.results[0].pageInfo.title + '<br/>' +
'<b>Description</b>' + data.results[0].pageInfo.description + '<br/>' +
var text = '<b>URL</b><a id="url" href="' + data.results[0].resolvedUrl + '"></a><br/>' +
'<b>Title</b><span id="title"></span><br/>' +
'<b>Description</b><span id="description"></span><br/>' +
'<b>Icon</b><img width="16px" height="16px" src="' + data.results[0].pageInfo.icon + '"/>';
log('Success', text, 'success');
$('#url').textContent = data.results[0].resolvedUrl;
$('#title').textContent = data.results[0].pageInfo.title;
$('#description').textContent = data.results[0].pageInfo.description;
enableButton();
})
.catch(error => {
Expand Down

0 comments on commit 34eb9c2

Please sign in to comment.