Page MenuHomePhabricator

Use Sanitizer::stripAllTags instead of Flow\Parsoid\Utils::htmlToPlaintext
Open, MediumPublic

Description

Flow\Parsoid\Utils::htmlToPlaintext does what Sanitizer::stripAllTags already does & we should probably re-use that instead of inventing the wheel.

Flow\Parsoid\Utils::htmlToPlaintext also truncates. We can either keep htmlToPlaintext around & make it call Sanitizer::stripAllTags (instead of stripping ourselves) & Language::truncate, or get rid of htmlToPlaintext altogether & call both of those wherever we're currently calling htmlToPlaintext

Event Timeline

matthiasmullie raised the priority of this task from to Needs Triage.
matthiasmullie updated the task description. (Show Details)
matthiasmullie subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
EBernhardson added a project: good first task.
EBernhardson set Security to None.

@matthiasmullie Is it about replacing Utils::htmlToPlaintext to Sanitizer::stripAllTags in Flow?