fix: table recognition content is not escaped properly (#13277)

pull/13308/head
Wang Xin 2024-07-06 17:29:59 +08:00 committed by GitHub
parent 7a3c580909
commit 43bd2ad642
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@
import numpy as np
from ppstructure.table.table_master_match import deal_eb_token, deal_bb
import html
def distance(box_1, box_2):
@ -133,6 +134,8 @@ class TableMatch:
and " " != content[-1]
):
content += " "
# escape content
content = html.escape(content)
end_html.extend(content)
if b_with:
end_html.extend("</b>")