Fix lenHTML() with empty string
This commit is contained in:
		
							
								
								
									
										5
									
								
								morss.py
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								morss.py
									
									
									
									
									
								
							@@ -70,7 +70,10 @@ def cleanXML(xml):
 | 
				
			|||||||
	return xml.translate(table, table[:32]).lstrip()
 | 
						return xml.translate(table, table[:32]).lstrip()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def lenHTML(txt):
 | 
					def lenHTML(txt):
 | 
				
			||||||
	return len(lxml.html.fromstring(txt).text_content())
 | 
						if len(txt):
 | 
				
			||||||
 | 
							return len(lxml.html.fromstring(txt).text_content())
 | 
				
			||||||
 | 
						else:
 | 
				
			||||||
 | 
							return 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def parseOptions(available):
 | 
					def parseOptions(available):
 | 
				
			||||||
	options = None
 | 
						options = None
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user