Lines 98-108
Link Here
|
98 |
var cardnumber = ""; |
98 |
var cardnumber = ""; |
99 |
if( item.cardnumber != "" ){ |
99 |
if( item.cardnumber != "" ){ |
100 |
// Display card number in parentheses if it exists |
100 |
// Display card number in parentheses if it exists |
101 |
cardnumber = " (" + item.cardnumber + ") "; |
101 |
cardnumber = " (" + ( item.cardnumber ? item.surname.escapeHtml() : "" ) + ") "; |
102 |
} |
102 |
} |
103 |
return $( "<li></li>" ) |
103 |
return $( "<li></li>" ) |
104 |
.data( "ui-autocomplete-item", item ) |
104 |
.data( "ui-autocomplete-item", item ) |
105 |
.append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) |
105 |
.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>" ) |
106 |
.appendTo( ul ); |
106 |
.appendTo( ul ); |
107 |
}; |
107 |
}; |
108 |
} |
108 |
} |
Lines 130-136
Link Here
|
130 |
} |
130 |
} |
131 |
return $( "<li></li>" ) |
131 |
return $( "<li></li>" ) |
132 |
.data( "ui-autocomplete-item", item ) |
132 |
.data( "ui-autocomplete-item", item ) |
133 |
.append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) |
133 |
.append( |
|
|
134 |
"<a href=\"" + item.link + "\">" + ( item.surname ? item.surname.escapeHtml() : "" ) + ", " |
135 |
+ ( item.firstname ? item.firstname.escapeHtml() : "" ) |
136 |
+ cardnumber.escapeHtml() |
137 |
+ " <small>" |
138 |
+ ( item.dateofbirth ? item.dateofbirth.escapeHtml() : "" ) + " " |
139 |
+ ( item.address ? item.address.escapeHtml() : "" ) + " " |
140 |
+ ( item.city ? item.city.escapeHtml() : "" ) + " " |
141 |
+ ( item.zipcode ? item.zipcode.escapeHtml() : "" ) + " " |
142 |
+ ( item.country ? item.country.escapeHtml() : "" ) |
143 |
+ "</small>" |
144 |
+ "</a>" ) |
134 |
.appendTo( ul ); |
145 |
.appendTo( ul ); |
135 |
}; |
146 |
}; |
136 |
} |
147 |
} |