Un-parse Pronunciation HTML because it's a Markdown field

This commit is contained in:
Robbie Antenesse 2015-11-09 15:44:10 -07:00
parent 924d330cec
commit 7fb4dfbb70
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,9 @@
<?php <?php
$notificationMessage = get_include_contents('notification.php'); $notificationMessage = get_include_contents('notification.php');
if ($_GET['adminoverride'] == 'dictionarytotext') {
echo '<script>document.write(localStorage.getItem("dictionary"));</script>';
} else {
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
@ -175,6 +179,8 @@ $notificationMessage = get_include_contents('notification.php');
</body> </body>
</html> </html>
<?php <?php
}
function get_include_contents($filename) { function get_include_contents($filename) {
if (is_file($filename)) { if (is_file($filename)) {
ob_start(); ob_start();

View File

@ -256,7 +256,7 @@ function DictionaryEntry(itemIndex) {
entryText += "<word>" + ((searchTerm != "" && document.getElementById("searchOptionWord").checked) ? currentDictionary.words[itemIndex].name.replace(searchRegEx, "<searchTerm>" + searchTerm + "</searchterm>") : currentDictionary.words[itemIndex].name) + "</word>"; entryText += "<word>" + ((searchTerm != "" && document.getElementById("searchOptionWord").checked) ? currentDictionary.words[itemIndex].name.replace(searchRegEx, "<searchTerm>" + searchTerm + "</searchterm>") : currentDictionary.words[itemIndex].name) + "</word>";
if (currentDictionary.words[itemIndex].pronunciation != "") { if (currentDictionary.words[itemIndex].pronunciation != "") {
entryText += "<pronunciation>" + markdown.toHTML(currentDictionary.words[itemIndex].pronunciation).replace("<p>","").replace("</p>","") + "</pronunciation>"; entryText += "<pronunciation>" + markdown.toHTML(htmlEntitiesParse(currentDictionary.words[itemIndex].pronunciation)).replace("<p>","").replace("</p>","") + "</pronunciation>";
} }
if (currentDictionary.words[itemIndex].partOfSpeech != "") { if (currentDictionary.words[itemIndex].partOfSpeech != "") {