Skip to content
Snippets Groups Projects
Commit eed9d294 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

dev #65273 : ensure utf-8 encoding of numeric entities

parent 82cf495a
Branches
Tags
3 merge requests!2409Master,!2399Dev#65273 s91 contractuel cavy export des articles agenda en json,!2392Dev#65273 s91 contractuel cavy export des articles agenda en json
Pipeline #2825 passed with stage
in 22 minutes and 52 seconds
......@@ -55,7 +55,7 @@ class Class_ICal_Event extends \Eluceo\iCal\Component\Event {
$event->setGeoLocation(new \Eluceo\iCal\Property\Event\Geo($latitude, $longitude));
$text_description = html_entity_decode(strip_tags($article->getFullContent()),
ENT_COMPAT|ENT_HTML401,
ENT_QUOTES|ENT_XHTML,
'UTF-8');
$event->setDescription($text_description);
$event->setDescriptionHTML($article->getFullContent());
......
......@@ -872,7 +872,7 @@ class CmsControllerCalendarActionIcalExportRecurrentAllDayTest
$opac4 = $this->fixture('Class_Article',
['id' => 5,
'titre' => 'OPAC 4 en prod !',
'contenu' => '<h3>youpi &amp; oui &ccedil;a déchire !</h3><img src="/userfiles/images/youpi.png">',
'contenu' => '<h3>youpi &amp; oui c&#39;est beau !</h3><img src="/userfiles/images/youpi.png">',
'lieu' => $this->annecy,
'all_day' => 1,
'pick_day' => '1,3,0',
......@@ -933,7 +933,7 @@ class CmsControllerCalendarActionIcalExportRecurrentAllDayTest
/** @test */
public function descriptionShouldBeYoupiWithoutHtml() {
$this->assertContains('DESCRIPTION:youpi & oui ça déchire !', $this->_ical);
$this->assertContains('DESCRIPTION:youpi & oui c\'est beau !', $this->_ical);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment