Fixed some apostrophe problems.

This commit is contained in:
Robbie Antenesse 2015-11-10 14:51:36 -07:00
parent 6e9d11ec0c
commit 92b047893d
1 changed files with 3 additions and 3 deletions

View File

@ -69,7 +69,7 @@ function AddWord() {
updateConflictArea.style.display = "block"; updateConflictArea.style.display = "block";
updateConflictArea.innerHTML = "<span id='updateConflictMessage'>Do you really want to change the word \"" + currentDictionary.words[parseInt(editIndex)].name + "\" to what you have set above?</span>"; updateConflictArea.innerHTML = "<span id='updateConflictMessage'>Do you really want to change the word \"" + currentDictionary.words[parseInt(editIndex)].name + "\" to what you have set above?</span>";
updateConflictArea.innerHTML += '<button type="button" id="updateConfirmButton" \ updateConflictArea.innerHTML += '<button type="button" id="updateConfirmButton" \
onclick="UpdateWord(' + editIndex + ', \'' + word + '\', \'' + pronunciation + '\', \'' + partOfSpeech + '\', \'' + simpleDefinition + '\', \'' + longDefinition + '\'); \ onclick="UpdateWord(' + editIndex + ', \'' + htmlEntities(word) + '\', \'' + htmlEntities(pronunciation) + '\', \'' + htmlEntities(partOfSpeech) + '\', \'' + htmlEntities(simpleDefinition) + '\', \'' + htmlEntities(longDefinition) + '\'); \
return false;">Yes, Update it</button>'; return false;">Yes, Update it</button>';
updateConflictArea.innerHTML += '<button type="button" id="updateCancelButton" onclick="CloseUpdateConflictArea(); return false;">No, Leave it</button>'; updateConflictArea.innerHTML += '<button type="button" id="updateCancelButton" onclick="CloseUpdateConflictArea(); return false;">No, Leave it</button>';
} else { } else {
@ -90,7 +90,7 @@ function AddWord() {
} }
updateConflictText += "<br>Do you want to update it to what you have set above?</span>"; updateConflictText += "<br>Do you want to update it to what you have set above?</span>";
updateConflictText += '<button type="button" id="updateConfirmButton" \ updateConflictText += '<button type="button" id="updateConfirmButton" \
onclick="UpdateWord(' + wordIndex + ', \'' + word + '\', \'' + pronunciation + '\', \'' + partOfSpeech + '\', \'' + simpleDefinition + '\', \'' + longDefinition + '\'); \ onclick="UpdateWord(' + wordIndex + ', \'' + htmlEntities(word) + '\', \'' + htmlEntities(pronunciation) + '\', \'' + htmlEntities(partOfSpeech) + '\', \'' + htmlEntities(simpleDefinition) + '\', \'' + htmlEntities(longDefinition) + '\'); \
return false;">Yes, Update it</button>'; return false;">Yes, Update it</button>';
updateConflictText += ' <button type="button" id="updateCancelButton" onclick="CloseUpdateConflictArea(); return false;">No, Leave it</button>'; updateConflictText += ' <button type="button" id="updateCancelButton" onclick="CloseUpdateConflictArea(); return false;">No, Leave it</button>';
@ -230,7 +230,7 @@ function ShowDictionary() {
if (currentDictionary.words.length > 0) { if (currentDictionary.words.length > 0) {
for (var i = 0; i < currentDictionary.words.length; i++) { for (var i = 0; i < currentDictionary.words.length; i++) {
if (filter == "" || (filter != "" && currentDictionary.words[i].partOfSpeech == filter)) { if (filter == "" || (filter != "" && currentDictionary.words[i].partOfSpeech == filter)) {
if (search == "" || (search != "" && searchResults.indexOf(currentDictionary.words[i].name) >= 0)) { if (search == "" || (search != "" && searchResults.indexOf(htmlEntities(currentDictionary.words[i].name)) >= 0)) {
if (!currentDictionary.words[i].hasOwnProperty("pronunciation")) { if (!currentDictionary.words[i].hasOwnProperty("pronunciation")) {
currentDictionary.words[i].pronunciation = ""; //Account for new property currentDictionary.words[i].pronunciation = ""; //Account for new property
} }