File tree Expand file tree Collapse file tree 16 files changed +220
-163
lines changed
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form
tests/Symfony/Tests/Component/Form Expand file tree Collapse file tree 16 files changed +220
-163
lines changed Original file line number Diff line number Diff line change 1
1
<input type="checkbox"
2
2
<?php echo $ view ['form ' ]->attributes () ?>
3
- name="<?php echo $ name ?> "
4
- <?php if ($ value ): ?> value="<?php echo $ value ?> "<?php endif ?>
3
+ name="<?php echo $ view -> escape ( $ name) ?> "
4
+ <?php if ($ value ): ?> value="<?php echo $ view -> escape ( $ value) ?> "<?php endif ?>
5
5
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
6
6
<?php if ($ required ): ?> required="required"<?php endif ?>
7
7
<?php if ($ checked ): ?> checked="checked"<?php endif ?>
Original file line number Diff line number Diff line change 8
8
<?php else : ?>
9
9
<select
10
10
<?php echo $ view ['form ' ]->attributes () ?>
11
- name="<?php echo $ name ?> "
11
+ name="<?php echo $ view -> escape ( $ name) ?> "
12
12
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
13
13
<?php if ($ multiple ): ?> multiple="multiple"<?php endif ?>
14
14
<?php if ($ class ): ?> class="<?php echo $ class ?> "<?php endif ?>
Original file line number Diff line number Diff line change 1
1
<?php if (!$ form ->hasParent () || !$ form ->getParent ()->hasParent ()): ?>
2
2
<input type="hidden"
3
3
<?php echo $ view ['form ' ]->attributes () ?>
4
- name="<?php echo $ name ?> "
5
- value="<?php echo $ value ?> "
4
+ name="<?php echo $ view -> escape ( $ name) ?> "
5
+ value="<?php echo $ view -> escape ( $ value) ?> "
6
6
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
7
7
/>
8
8
<?php endif ?>
Original file line number Diff line number Diff line change 1
1
<?php if ($ widget == 'text ' ): ?>
2
2
<input type="text"
3
3
<?php echo $ view ['form ' ]->attributes () ?>
4
- name="<?php echo $ name ?> "
5
- value="<?php echo $ value ?> "
4
+ name="<?php echo $ view -> escape ( $ name) ?> "
5
+ value="<?php echo $ view -> escape ( $ value) ?> "
6
6
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
7
7
<?php if ($ required ): ?> required="required"<?php endif ?>
8
8
<?php if ($ class ): ?> class="<?php echo $ class ?> "<?php endif ?>
Original file line number Diff line number Diff line change 1
- <label for="<?php echo $ id ?> "><?php echo $ view ['translator ' ]->trans ($ label ) ?> </label>
1
+ <label for="<?php echo $ view -> escape ( $ id ) ?> "><?php echo $ view-> escape ( $ view ['translator ' ]->trans ($ label) ) ?> </label>
Original file line number Diff line number Diff line change 1
1
<input
2
2
<?php echo $ view ['form ' ]->attributes () ?>
3
- name="<?php echo $ name ?> "
4
- value="<?php echo $ value ?> "
3
+ name="<?php echo $ view -> escape ( $ name) ?> "
4
+ value="<?php echo $ view -> escape ( $ value) ?> "
5
5
<?php if ($ class ): ?> class="<?php echo $ class ; ?> "<?php endif ; ?>
6
6
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
7
7
<?php if ($ required ): ?> required="required"<?php endif ?>
Original file line number Diff line number Diff line change 1
1
<div<?php echo $ view ['form ' ]->attributes () ?> >
2
2
<input type="file"
3
- id="<?php echo $ form ['file ' ]->getVar ('id ' ) ?> "
4
- name="<?php echo $ form ['file ' ]->getVar ('name ' ) ?> "
3
+ id="<?php echo $ view -> escape ( $ form ['file ' ]->getVar ('id ' ) ) ?> "
4
+ name="<?php echo $ view -> escape ( $ form ['file ' ]->getVar ('name ' ) ) ?> "
5
5
<?php if ($ form ['file ' ]->getVar ('disabled ' )): ?> disabled="disabled"<?php endif ?>
6
6
<?php if ($ form ['file ' ]->getVar ('required ' )): ?> required="required"<?php endif ?>
7
7
<?php if ($ form ['file ' ]->getVar ('class ' )): ?> class="<?php echo $ form ['file ' ]->getVar ('class ' ) ?> "<?php endif ?>
Original file line number Diff line number Diff line change 1
1
<input type="hidden"
2
2
<?php echo $ view ['form ' ]->attributes () ?>
3
- name="<?php echo $ name ?> "
4
- value="<?php echo $ value ?> "
3
+ name="<?php echo $ view -> escape ( $ name) ?> "
4
+ value="<?php echo $ view -> escape ( $ value) ?> "
5
5
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
6
6
/>
Original file line number Diff line number Diff line change 1
1
<input type="number"
2
2
<?php echo $ view ['form ' ]->attributes () ?>
3
- name="<?php echo $ name ?> "
4
- value="<?php echo $ value ?> "
3
+ name="<?php echo $ view -> escape ( $ name) ?> "
4
+ value="<?php echo $ view -> escape ( $ value) ?> "
5
5
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
6
6
<?php if ($ required ): ?> required="required"<?php endif ?>
7
7
<?php if ($ class ): ?> class="<?php echo $ class ?> "<?php endif ?>
Original file line number Diff line number Diff line change 1
1
<input type="text"
2
2
<?php echo $ view ['form ' ]->attributes () ?>
3
- name="<?php echo $ name ?> "
4
- value="<?php echo $ value ?> "
3
+ name="<?php echo $ view -> escape ( $ name) ?> "
4
+ value="<?php echo $ view -> escape ( $ value) ?> "
5
5
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
6
6
<?php if ($ required ): ?> required="required"<?php endif ?>
7
7
<?php if ($ class ): ?> class="<?php echo $ class ?> "<?php endif ?>
Original file line number Diff line number Diff line change 1
1
<input type="password"
2
2
<?php echo $ view ['form ' ]->attributes () ?>
3
- name="<?php echo $ name ?> "
4
- value="<?php echo $ value ?> "
3
+ name="<?php echo $ view -> escape ( $ name) ?> "
4
+ value="<?php echo $ view -> escape ( $ value) ?> "
5
5
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
6
6
<?php if ($ required ): ?> required="required"<?php endif ?>
7
7
<?php if ($ class ): ?> class="<?php echo $ class ?> "<?php endif ?>
Original file line number Diff line number Diff line change 1
1
<input type="radio"
2
2
<?php echo $ view ['form ' ]->attributes () ?>
3
- name="<?php echo $ name ?> "
4
- value="<?php echo $ value ?> "
3
+ name="<?php echo $ view -> escape ( $ name) ?> "
4
+ value="<?php echo $ view -> escape ( $ value) ?> "
5
5
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
6
6
<?php if ($ required ): ?> required="required"<?php endif ?>
7
7
<?php if ($ checked ): ?> checked="checked"<?php endif ?>
Original file line number Diff line number Diff line change 1
1
<input type="text"
2
2
<?php echo $ view ['form ' ]->attributes () ?>
3
- name="<?php echo $ name ?> "
4
- value="<?php echo $ value ?> "
3
+ name="<?php echo $ view -> escape ( $ name) ?> "
4
+ value="<?php echo $ view -> escape ( $ value) ?> "
5
5
<?php if ($ class ): ?> class="<?php echo $ class ; ?> "<?php endif ; ?>
6
6
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
7
7
<?php if ($ required ): ?> required="required"<?php endif ?>
Original file line number Diff line number Diff line change 1
1
<textarea
2
2
<?php echo $ view ['form ' ]->attributes () ?>
3
- name="<?php echo $ name ?> "
3
+ name="<?php echo $ view -> escape ( $ name) ?> "
4
4
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
5
5
<?php if ($ required ): ?> required="required"<?php endif ?>
6
6
<?php if ($ class ): ?> class="<?php echo $ class ?> "<?php endif ?>
7
- ><?php
8
- echo $ view ->escape ($ value )
9
- ?> </textarea>
7
+ ><?php echo $ view ->escape ($ value ) ?> </textarea>
Original file line number Diff line number Diff line change 1
1
<input type="url"
2
2
<?php echo $ view ['form ' ]->attributes () ?>
3
- name="<?php echo $ name ?> "
4
- value="<?php echo $ value ?> "
3
+ name="<?php echo $ view -> escape ( $ name) ?> "
4
+ value="<?php echo $ view -> escape ( $ value) ?> "
5
5
<?php if ($ read_only ): ?> disabled="disabled"<?php endif ?>
6
6
<?php if ($ required ): ?> required="required"<?php endif ?>
7
7
<?php if ($ class ): ?> class="<?php echo $ class ?> "<?php endif ?>
You can’t perform that action at this time.
0 commit comments