From bb3b99f0a5b5501b50e1e2d0325f51f92e0df035 Mon Sep 17 00:00:00 2001 From: Magicbook1108 Date: Thu, 30 Apr 2026 12:30:41 +0800 Subject: [PATCH] Feat: add button for remove header & footer in pipeline (#14486) ### What problem does this PR solve? Feat: add button for remove header & footer in pipeline ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- deepdoc/parser/html_parser.py | 3 +- rag/flow/parser/parser.py | 99 +++++-------------- rag/flow/parser/pdf_chunk_metadata.py | 5 +- rag/flow/parser/utils.py | 43 ++++++++ web/src/locales/en.ts | 1 + web/src/locales/zh.ts | 1 + web/src/pages/agent/constant/pipeline.tsx | 5 + .../form/parser-form/common-form-fields.tsx | 22 +++++ .../pages/agent/form/parser-form/index.tsx | 3 + .../form/parser-form/pdf-form-fields.tsx | 2 + .../parser-form/text-html-form-fields.tsx | 8 +- .../form/parser-form/word-form-fields.tsx | 2 + web/src/pages/agent/utils.ts | 23 +++++ 13 files changed, 135 insertions(+), 82 deletions(-) diff --git a/deepdoc/parser/html_parser.py b/deepdoc/parser/html_parser.py index f4d360c641..7462ad99e9 100644 --- a/deepdoc/parser/html_parser.py +++ b/deepdoc/parser/html_parser.py @@ -52,7 +52,7 @@ class RAGFlowHtmlParser: raise TypeError("txt type should be string!") temp_sections = [] - soup = BeautifulSoup(txt, "html5lib") + soup = BeautifulSoup(txt, "html.parser") # delete