1
0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-09-19 15:42:58 +00:00

Merge pull request #5 from awesomecoders/master

fixed escaping for passwords with double quotes
This commit is contained in:
Knut Ahlers 2015-08-08 01:09:53 +02:00
commit 7e89736529
3 changed files with 325 additions and 4344 deletions

View File

@ -198,7 +198,7 @@
password += "*"; password += "*";
} }
ul.append("<li><label>Username:</label><input type=\"text\" class=\"username\" value=\"" + item.username + "\">" + (this.getClippyCode(item.username)) + "<br></li>"); ul.append("<li><label>Username:</label><input type=\"text\" class=\"username\" value=\"" + item.username + "\">" + (this.getClippyCode(item.username)) + "<br></li>");
ul.append("<li class=\"passwordtoggle\"><label>Password:</label><input type=\"text\" class=\"password\" value=\"" + password + "\" data-toggle=\"" + item.password + "\"><em> (toggle visibility)</em></span>" + (this.getClippyCode(item.password)) + "<br></li>"); ul.append("<li class=\"passwordtoggle\"><label>Password:</label><input type=\"text\" class=\"password\" value=\"" + password + "\" data-toggle=\"" + (item.password.replace(/"/g, '&quot;')) + "\"><em> (toggle visibility)</em></span>" + (this.getClippyCode(item.password)) + "<br></li>");
ul.append("<li><label>URL:</label><input type=\"text\" class=\"url\" value=\"" + item.url + "\">" + (this.getClippyCode(item.url)) + "<br></li>"); ul.append("<li><label>URL:</label><input type=\"text\" class=\"url\" value=\"" + item.url + "\">" + (this.getClippyCode(item.url)) + "<br></li>");
lines_match = item.comment.match(/\n/g); lines_match = item.comment.match(/\n/g);
if (lines_match !== null) { if (lines_match !== null) {

4665
bindata.go

File diff suppressed because one or more lines are too long

View File

@ -141,7 +141,7 @@ class CloudKeys
for char, i of item.password for char, i of item.password
password += "*" password += "*"
ul.append("<li><label>Username:</label><input type=\"text\" class=\"username\" value=\"#{ item.username }\">#{ @getClippyCode(item.username) }<br></li>") ul.append("<li><label>Username:</label><input type=\"text\" class=\"username\" value=\"#{ item.username }\">#{ @getClippyCode(item.username) }<br></li>")
ul.append("<li class=\"passwordtoggle\"><label>Password:</label><input type=\"text\" class=\"password\" value=\"#{ password }\" data-toggle=\"#{ item.password }\"><em> (toggle visibility)</em></span>#{ @getClippyCode(item.password) }<br></li>") ul.append("<li class=\"passwordtoggle\"><label>Password:</label><input type=\"text\" class=\"password\" value=\"#{ password }\" data-toggle=\"#{ item.password.replace(/"/g, '&quot;') }\"><em> (toggle visibility)</em></span>#{ @getClippyCode(item.password) }<br></li>")
ul.append("<li><label>URL:</label><input type=\"text\" class=\"url\" value=\"#{ item.url }\">#{ @getClippyCode(item.url) }<br></li>") ul.append("<li><label>URL:</label><input type=\"text\" class=\"url\" value=\"#{ item.url }\">#{ @getClippyCode(item.url) }<br></li>")
lines_match = item.comment.match(/\n/g) lines_match = item.comment.match(/\n/g)
if lines_match isnt null if lines_match isnt null