From 5bee25d651db47cef1d2b14614a00bfadb6092a9 Mon Sep 17 00:00:00 2001 From: Abijeet Date: Mon, 2 Jul 2018 00:39:33 +0530 Subject: [PATCH] Fixes a few comments. Signed-off-by: Abijeet --- app/Services/ExportService.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Services/ExportService.php b/app/Services/ExportService.php index 0b2169985..d912671b0 100644 --- a/app/Services/ExportService.php +++ b/app/Services/ExportService.php @@ -188,11 +188,11 @@ class ExportService } } + // Replace problems caused by TinyMCE removing the protocol for YouTube, Google Maps, DailyMotion and Vimeo if ($isPDF) { $callback = [$this, 'replaceContentPDF']; // Replace video tag in PDF $htmlContent = $this->replaceLinkedTags(self::VIDEO_REGEX, $htmlContent, $callback, 'Video'); - // Replace problems caused by TinyMCE removing the protocol for YouTube, Google Maps, DailyMotion and Vimeo $htmlContent = $this->replaceLinkedTags(self::YOUTUBE_REGEX, $htmlContent, $callback, 'Video'); $htmlContent = $this->replaceLinkedTags(self::GOOGLE_MAP_REGEX, $htmlContent, $callback, 'Video'); $htmlContent = $this->replaceLinkedTags(self::DAILYMOTION_REGEX, $htmlContent, $callback, 'Video'); @@ -274,13 +274,14 @@ class ExportService } /** - * Can be used to replace certain tags that cause problems. + * Can be used to replace certain tags that cause problems such as the TinyMCE video tag + * modification that have to be undone. * See - https://github.com/tinymce/tinymce/blob/0f7a0f12667bde6eae9377b50b797f4479aa1ac7/src/plugins/media/main/ts/core/UrlPatterns.ts#L22 * @param String $regex * @param String $htmlContent * @param Array $callback * @param String $dynamicText - * @return String + * @return String $htmlContent - Modified html content */ protected function replaceLinkedTags($regex, $htmlContent, $callback, $dynamicText = '') { $iframeOutput = [];