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 added a subscriber: matthiasmullie.
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptApr 15 2015, 2:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
EBernhardson triaged this task as Medium priority.Apr 17 2015, 5:53 PM
EBernhardson added a project: good first task.
EBernhardson set Security to None.

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

Kizule added a subscriber: Kizule.Feb 1 2018, 3:14 PM