fedimbed: syntax error moment
This commit is contained in:
		
							parent
							
								
									e0c699acf5
								
							
						
					
					
						commit
						ac94fa00e3
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -83,7 +83,7 @@ async function processUrl(msg, url) {
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  let postData;
 | 
					  let postData;
 | 
				
			||||||
  if (rawPostData.startsWith("{") {
 | 
					  if (rawPostData.startsWith("{")) {
 | 
				
			||||||
    postData = JSON.parse(rawPostData);
 | 
					    postData = JSON.parse(rawPostData);
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    logger.error("fedimbed", `Got non-JSON for "${url}": ${rawPostData}`);
 | 
					    logger.error("fedimbed", `Got non-JSON for "${url}": ${rawPostData}`);
 | 
				
			||||||
| 
						 | 
					@ -190,10 +190,10 @@ async function processUrl(msg, url) {
 | 
				
			||||||
  cw = cw ?? "";
 | 
					  cw = cw ?? "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // TODO: convert certain HTML tags back to markdown
 | 
					  // TODO: convert certain HTML tags back to markdown
 | 
				
			||||||
  content = content.replace(/(<([^>]+)>)/gi,"");
 | 
					  content = content.replace(/(<([^>]+)>)/gi, "");
 | 
				
			||||||
  content = parseHtmlEntities(content);
 | 
					  content = parseHtmlEntities(content);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  cw = cw.replace(/(<([^>]+)>)/gi,"");
 | 
					  cw = cw.replace(/(<([^>]+)>)/gi, "");
 | 
				
			||||||
  cw = parseHtmlEntities(cw);
 | 
					  cw = parseHtmlEntities(cw);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  let desc = "";
 | 
					  let desc = "";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue