This PR changes the edit job view to make use of a textarea tag instead of an input tag for the job command field.
Why
The command doesn't have any HTML escaping and therefore might cut short the value displayed in the input tag. For example, if the command of a job was command "some text", the displayed HTML command would be command as the value property of the input tag was closed by the double quote in the command value, causing the rest of the command to be added as attributes to the input field. I considered escaping the HTML and displaying the entire command in an input field but that meant that when saving the command all HTML entities would now be stored as escaped HTML rather than their characters. A textarea seemed better suited for the job and provided the additional benefit of the command input being re-sizeable.
Overall this change has two benefits: 1) the cron job command is now fully displayed and is able to be edited by the user without having to re-enter the entire command and 2) users can make use of the resize textbox feature built-in by browsers to increase the textarea size if the command doesn't fit in the default textarea size.
Screenshots
Original command information displayed for context
Truncated job command caused by this issue
Complete job shown as displayed with proposed changes
What
This PR changes the edit job view to make use of a textarea tag instead of an input tag for the job command field.
Why
The command doesn't have any HTML escaping and therefore might cut short the value displayed in the input tag. For example, if the command of a job was
command "some text"
, the displayed HTML command would becommand
as thevalue
property of the input tag was closed by the double quote in the command value, causing the rest of the command to be added as attributes to the input field. I considered escaping the HTML and displaying the entire command in an input field but that meant that when saving the command all HTML entities would now be stored as escaped HTML rather than their characters. A textarea seemed better suited for the job and provided the additional benefit of the command input being re-sizeable.Overall this change has two benefits: 1) the cron job command is now fully displayed and is able to be edited by the user without having to re-enter the entire command and 2) users can make use of the resize textbox feature built-in by browsers to increase the textarea size if the command doesn't fit in the default textarea size.
Screenshots