Skip to content

Commit 324a943

Browse files
committed
Update UserController.php
1 parent 9447d21 commit 324a943

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/Http/Controllers/UserController.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,11 @@ public function importData(Request $request)
11491149
$user->littlelink_name = $userData['littlelink_name'];
11501150
}
11511151
if (isset($userData['littlelink_description'])) {
1152-
$user->littlelink_description = $userData['littlelink_description'];
1152+
$sanitizedText = $userData['littlelink_description'];
1153+
$sanitizedText = strip_tags($sanitizedText, '<a><p><strong><i><ul><ol><li><blockquote><h2><h3><h4>');
1154+
$sanitizedText = preg_replace("/<a([^>]*)>/i", "<a $1 rel=\"noopener noreferrer nofollow\">", $sanitizedText);
1155+
$sanitizedText = strip_tags_except_allowed_protocols($sanitizedText);
1156+
$user->littlelink_description = $sanitizedText;
11531157
}
11541158
if (isset($userData['image_data'])) {
11551159
// Decode the image data from Base64

0 commit comments

Comments
 (0)