File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 5757 // Create the group select drop-down
5858 echo '<select id="GroupID" name="GroupID" onChange="UpdateRoles();"><option value="0"> ' . gettext ('None ' ) . '</option> ' ;
5959 foreach ($ ormGroups as $ ormGroup ) {
60- echo '<option value=" ' . $ ormGroup ->getID () . '"> ' . $ ormGroup ->getName () . '</option> ' ;
60+ echo '<option value=" ' . $ ormGroup ->getID () . '"> ' . htmlspecialchars ( $ ormGroup ->getName (), ENT_QUOTES , ' UTF-8 ' ) . '</option> ' ;
6161 }
6262 echo '</select> ' ; ?>
6363 </td>
Original file line number Diff line number Diff line change 4444$ rsPropList = RunQuery ($ sSQL );
4545$ numRows = mysqli_num_rows ($ rsPropList );
4646
47- $ sPageTitle = gettext ('Group View ' ) . ' : ' . $ thisGroup ->getName ();
47+ $ sPageTitle = gettext ('Group View ' ) . ' : ' . htmlspecialchars ( $ thisGroup ->getName (), ENT_QUOTES , ' UTF-8 ' );
4848
4949require_once 'Include/Header.php ' ;
5050
119119
120120<div class="card card-info card-outline">
121121 <div class="card-header">
122- <h3 class="card-title"><i class="fa-solid fa-info-circle"></i> <?= $ thisGroup ->getName () ?> </h3>
122+ <h3 class="card-title"><i class="fa-solid fa-info-circle"></i> <?= htmlspecialchars ( $ thisGroup ->getName (), ENT_QUOTES , ' UTF-8 ' ) ?> </h3>
123123 </div>
124124 <div class="card-body">
125125 <div class="mb-3">
@@ -459,7 +459,7 @@ function allPhonesCommaD() {
459459 bootbox.confirm({
460460 title: "<?= gettext ("Confirm Delete Group " ) ?> ",
461461 message: '<p class="text-danger">' +
462- "<?= gettext ("Please confirm deletion of this group record " ) ?> : <?= $ thisGroup ->getName () ?> </p>" +
462+ "<?= gettext ("Please confirm deletion of this group record " ) ?> : " + <?= json_encode ( $ thisGroup ->getName (), JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT ) ?> + " </p>" +
463463 "<p>" +
464464 "<?= gettext ("This will also delete all Roles and Group-Specific Property data associated with this Group record. " ) ?> " +
465465 "</p><p>" +
Original file line number Diff line number Diff line change 115115 if ($ groupSettings ['isSundaySchool ' ] ?? false ) {
116116 $ group ->makeSundaySchool ();
117117 }
118- $ group ->setName ($ groupSettings ['groupName ' ]);
119- $ group ->setDescription ($ groupSettings ['description ' ] ?? '' );
118+ $ group ->setName (strip_tags ( $ groupSettings ['groupName ' ]) );
119+ $ group ->setDescription (strip_tags ( $ groupSettings ['description ' ] ?? '' ) );
120120 $ group ->setType ($ groupSettings ['groupType ' ] ?? 0 );
121121 $ group ->save ();
122122 return SlimUtils::renderJSON ($ response , $ group ->toArray ());
126126 $ groupID = $ args ['groupID ' ];
127127 $ input = $ request ->getParsedBody ();
128128 $ group = GroupQuery::create ()->findOneById ($ groupID );
129- $ group ->setName ($ input ['groupName ' ]);
129+ $ group ->setName (strip_tags ( $ input ['groupName ' ]) );
130130 $ group ->setType ($ input ['groupType ' ]);
131- $ group ->setDescription ($ input ['description ' ] ?? '' );
131+ $ group ->setDescription (strip_tags ( $ input ['description ' ] ?? '' ) );
132132 $ group ->save ();
133133 return SlimUtils::renderJSON ($ response , $ group ->toArray ());
134134 });
Original file line number Diff line number Diff line change 179179 // Create the group select drop-down
180180 echo '<select id="GroupID" name="GroupID[]" multiple size="8" onChange="UpdateRoles();"><option value="0"> ' . gettext ('None ' ) . '</option> ' ;
181181 foreach ($ groups as $ group ) {
182- echo '<option value=" ' . $ group ->getID () . '"> ' . $ group ->getName () . '</option> ' ;
182+ echo '<option value=" ' . $ group ->getID () . '"> ' . htmlspecialchars ( $ group ->getName (), ENT_QUOTES , ' UTF-8 ' ) . '</option> ' ;
183183 }
184184 echo '</select><br> ' ;
185185 echo gettext ('Multiple groups will have a Page Break between Groups<br> ' );
You can’t perform that action at this time.
0 commit comments