Lines 104-114
Link Here
|
104 |
var cardnumber = ""; |
104 |
var cardnumber = ""; |
105 |
if( item.cardnumber != "" ){ |
105 |
if( item.cardnumber != "" ){ |
106 |
// Display card number in parentheses if it exists |
106 |
// Display card number in parentheses if it exists |
107 |
cardnumber = " (" + item.cardnumber + ") "; |
107 |
cardnumber = " (" + ( item.cardnumber ? item.surname.escapeHtml() : "" ) + ") "; |
108 |
} |
108 |
} |
109 |
return $( "<li></li>" ) |
109 |
return $( "<li></li>" ) |
110 |
.data( "ui-autocomplete-item", item ) |
110 |
.data( "ui-autocomplete-item", item ) |
111 |
.append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) |
111 |
.append( "<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", " + ( item.firstname ? item.firstname.escapeHtml : "" ) + ( cardnumber ? cardnumber.escapeHtml() : "" ) + " <small>" + ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" ) + " " + ( item.address ? item.address.escapeHtml() : "" ) + " " + ( item.city ? item.city.escapeHtml() : "" ) + " " + ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " " + ( item.country ? item.country.escapeHtml() : "" ) + "</small></a>" ) |
112 |
.appendTo( ul ); |
112 |
.appendTo( ul ); |
113 |
}; |
113 |
}; |
114 |
} |
114 |
} |
Lines 137-143
Link Here
|
137 |
} |
137 |
} |
138 |
return $( "<li></li>" ) |
138 |
return $( "<li></li>" ) |
139 |
.data( "ui-autocomplete-item", item ) |
139 |
.data( "ui-autocomplete-item", item ) |
140 |
.append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) |
140 |
.append( |
|
|
141 |
"<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", " |
142 |
+ ( item.firstname ? item.firstname.escapeHtml() : "" ) |
143 |
+ cardnumber.escapeHtml() |
144 |
+ " <small>" |
145 |
+ ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" ) + " " |
146 |
+ ( item.address ? item.address.escapeHtml() : "" ) + " " |
147 |
+ ( item.city ? item.city.escapeHtml() : "" ) + " " |
148 |
+ ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " " |
149 |
+ ( item.country ? item.country.escapeHtml() : "" ) |
150 |
+ "</small>" |
151 |
+ "</a>" ) |
141 |
.appendTo( ul ); |
152 |
.appendTo( ul ); |
142 |
}; |
153 |
}; |
143 |
} |
154 |
} |