• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sync/office365/converter/converter.php
  • Класс: BitrixCalendarSyncOffice365ConverterConverter
  • Вызов: Converter::prepareBody
private function prepareBody(Office365DtoRichTextDto $body, int $userId): string
{
	if ($body->contentType === 'html')
	{
		$text = CCalendar::ParseHTMLToBB($body->content);
	}
	else
	{
		$text = $body->content;
	}

	$text = html_entity_decode($text, ENT_QUOTES | ENT_XML1);
	$text = html_entity_decode($text, ENT_QUOTES | ENT_XML1);
	$languageId = CCalendar::getUserLanguageId($userId);

	return (new SyncUtilEventDescription())->prepareAfterImport($text, $languageId);
}