Skip to content

Commit

Permalink
fix: table recognition content is not escaped properly
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatV committed Jul 6, 2024
1 parent 7a3c580 commit 50e025b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ppstructure/table/matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -133,6 +134,8 @@ def get_pred_html(self, pred_structures, matched_index, ocr_contents):
and " " != content[-1]
):
content += " "
# escape content
content = html.escape(content)
end_html.extend(content)
if b_with:
end_html.extend("</b>")
Expand Down

0 comments on commit 50e025b

Please sign in to comment.