|
90 | 90 | $stmt->execute(array( |
91 | 91 | ':pfp' => $base64, |
92 | 92 | ':usrid' => $_SESSION['user_id'], |
93 | | - ':newUsername' => str_replace('<', ' ¯\_(ツ)_/¯ ', $_POST['username']), |
94 | | - ':newName' => str_replace('<', ' ¯\_(ツ)_/¯ ', $_POST['name']), |
95 | | - ':email' => str_replace('<', ' ¯\_(ツ)_/¯ ', $_POST['email']), |
| 93 | + ':newUsername' => $_POST['username'], |
| 94 | + ':newName' => $_POST['name'], |
| 95 | + ':email' => $_POST['email'], |
96 | 96 | ':password' => $hash, |
97 | | - ':about' => str_replace('<', ' ¯\_(ツ)_/¯ ', $_POST['about']), |
| 97 | + ':about' => $_POST['about'], |
98 | 98 | ':showEmail' => $show_email |
99 | 99 | )); |
100 | 100 | $_SESSION['success'] = 'Account details updated.'; |
|
177 | 177 | Select image to upload for <?= $_SESSION['username'] ?> |
178 | 178 | <input type="file" name="fileToUpload" id="fileToUpload"> |
179 | 179 | <label for="name" class="sr-only">Username</label> |
180 | | - <input type="text" name="username" class="form-control" placeholder="" required="" autofocus="" value="<?= $response['username'] ?>"> |
| 180 | + <input type="text" name="username" class="form-control" placeholder="" required="" autofocus="" value="<?= htmlentities($response['username']) ?>"> |
181 | 181 | <label for="name" class="sr-only">Name</label> |
182 | | - <input type="text" name="name" class="form-control" placeholder="" required="" autofocus="" value="<?= $response['name'] ?>"> |
| 182 | + <input type="text" name="name" class="form-control" placeholder="" required="" autofocus="" value="<?= htmlentities($response['name']) ?>"> |
183 | 183 | <label for="email" class="sr-only">Email</label> |
184 | | - <input type="email" name="email" class="form-control" placeholder="" required="" value="<?= $response['email'] ?>"> |
| 184 | + <input type="email" name="email" class="form-control" placeholder="" required="" value="<?= htmlentities($response['email']) ?>"> |
185 | 185 | <label for="about" class="sr-only">About</label> |
186 | | - <input type="text" name="about" class="form-control" placeholder="" required="" value="<?= $response['about'] ?>"> |
| 186 | + <input type="text" name="about" class="form-control" placeholder="" required="" value="<?= htmlentities($response['about']) ?>"> |
187 | 187 | <label for="password" class="sr-only">New Password</label> |
188 | 188 | <input type="password" name="password" class="form-control" placeholder="Password" required=""> |
189 | 189 | <div class="checkbox mb-3"> |
|
0 commit comments