Skip to content

Commit

Permalink
Update UserController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianPrieber committed Feb 5, 2024
1 parent 9447d21 commit 324a943
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,11 @@ public function importData(Request $request)
$user->littlelink_name = $userData['littlelink_name'];
}
if (isset($userData['littlelink_description'])) {
$user->littlelink_description = $userData['littlelink_description'];
$sanitizedText = $userData['littlelink_description'];
$sanitizedText = strip_tags($sanitizedText, '<a><p><strong><i><ul><ol><li><blockquote><h2><h3><h4>');
$sanitizedText = preg_replace("/<a([^>]*)>/i", "<a $1 rel=\"noopener noreferrer nofollow\">", $sanitizedText);
$sanitizedText = strip_tags_except_allowed_protocols($sanitizedText);
$user->littlelink_description = $sanitizedText;
}
if (isset($userData['image_data'])) {
// Decode the image data from Base64
Expand Down

0 comments on commit 324a943

Please sign in to comment.