equal
deleted
inserted
replaced
219 |
219 |
220 # do not use pandoc to convert from html to html |
220 # do not use pandoc to convert from html to html |
221 if from_format==to_format=='html': |
221 if from_format==to_format=='html': |
222 # get body content |
222 # get body content |
223 stdoutdata = (content.encode('utf8')) |
223 stdoutdata = (content.encode('utf8')) |
224 soup = BeautifulSoup(stdoutdata) |
224 soup = BeautifulSoup(stdoutdata, fromEncoding='UTF-8') |
225 body = soup.body |
225 body = soup.body |
226 if body: |
226 if body: |
227 stdoutdata = body.renderContents() |
227 stdoutdata = body.renderContents() |
228 # strip leading spaces |
228 # strip leading spaces |
229 stdoutdata = re.sub(r"^\s+", '', stdoutdata) |
229 stdoutdata = re.sub(r"^\s+", '', stdoutdata) |