${brewText.replaceAll('&', '&').replaceAll('<','<').replaceAll('>', '>')}`;
+ } else if(type == 'download') {
+ return brewText;
+ } else {
+ console.log('Unhandled source share type');
+ return;
+ }
+}
+
//Source page
app.get('/source/:id', (req, res)=>{
return shareFunction(req, res, 'source');
diff --git a/server/homebrew.model.js b/server/homebrew.model.js
index 3d417f9e8..05a9ab673 100644
--- a/server/homebrew.model.js
+++ b/server/homebrew.model.js
@@ -34,16 +34,6 @@ HomebrewSchema.methods.sanatize = function(full=false){
return brew;
};
-HomebrewSchema.methods.escapeTextForHtmlDisplay = function(){
- const replaceStrings = { '&': '&', '<': '<', '>': '>' };
- text = this.text;
- for (const replaceStr in replaceStrings) {
- text = text.replaceAll(replaceStr, replaceStrings[replaceStr]);
- }
- text = `