@@ -264,9 +264,13 @@ public function saveLink(request $request)
264264 'button_id ' => "42 " ,
265265 ]);
266266 }elseif ($ linkType ->typename == "text " ){
267+ $ sanitizedText = $ request ->text ;
268+ $ sanitizedText = strip_tags ($ sanitizedText , '<a><p><strong><i><ul><ol><li><blockquote><h2><h3><h4> ' );
269+ $ sanitizedText = preg_replace ("/<a([^>]*)>/i " , "<a $1 rel= \"noopener noreferrer nofollow \"> " , $ sanitizedText );
270+ $ sanitizedText = strip_tags_except_allowed_protocols ($ sanitizedText );
267271 $ OrigLink ->update ([
268272 'button_id ' => "93 " ,
269- 'title ' => $ request -> text ,
273+ 'title ' => $ sanitizedText ,
270274 ]);
271275 }elseif ($ linkType ->typename == "email " ){
272276 $ LinkURL = "mailto: " .$ LinkURL ;
@@ -387,8 +391,12 @@ public function saveLink(request $request)
387391 }elseif ($ linkType ->typename == "heading " ){
388392 $ links ->button_id = "42 " ;
389393 }elseif ($ linkType ->typename == "text " ){
394+ $ sanitizedText = $ request ->text ;
395+ $ sanitizedText = strip_tags ($ sanitizedText , '<a><p><strong><i><ul><ol><li><blockquote><h2><h3><h4> ' );
396+ $ sanitizedText = preg_replace ("/<a([^>]*)>/i " , "<a $1 rel= \"noopener noreferrer nofollow \"> " , $ sanitizedText );
397+ $ sanitizedText = strip_tags_except_allowed_protocols ($ sanitizedText );
390398 $ links ->button_id = "93 " ;
391- $ links ->title = $ request -> text ;
399+ $ links ->title = $ sanitizedText ;
392400 }elseif ($ linkType ->typename == "email " ){
393401 $ links ->link = "mailto: " .$ links ->link ;
394402 $ links ->button_id = $ button ?->id;
@@ -789,6 +797,7 @@ public function editPage(Request $request)
789797 $ pageName = $ request ->littlelink_name ;
790798 $ pageDescription = strip_tags ($ request ->pageDescription , '<a><p><strong><i><ul><ol><li><blockquote><h2><h3><h4> ' );
791799 $ pageDescription = preg_replace ("/<a([^>]*)>/i " , "<a $1 rel= \"noopener noreferrer nofollow \"> " , $ pageDescription );
800+ $ pageDescription = strip_tags_except_allowed_protocols ($ pageDescription );
792801 $ name = $ request ->name ;
793802 $ checkmark = $ request ->checkmark ;
794803 $ sharebtn = $ request ->sharebtn ;
0 commit comments