MBS-7771: Escape the content of textarea tags

Textarea fields that are prefilled with text containing HTML tags (or
otherwise using HTML reserved characters) hadn't this content escaped.
Most browsers accept this anyway and treat "<" as if it were "&lt;";
however, this means that it is treated the same as a literal "&lt;",
and both will be read as "<" when the form is submitted. This is a
problem in particular for link type documentation that may contain
HTML tags.

This is fixed by properly escaping all reserved characters, such that
"<" becomes "&lt;" and a literal "&lt;" becomes "&amp;lt;".
Escape the content of option tags
Fix double closing button tag
Add checks for valid HTML to link type edit tests

The controller tests for the link type and link attribute type edit
pages didn't check that the pages were valid HTML. These tests would
have caught the double closing tag fixed in the previous commit.
Remove spurious trailing slash from URL in test
Merge remote-tracking branch 'chirlu/mbs-7771' into beta

* chirlu/mbs-7771:
  Remove spurious trailing slash from URL in test
  Add checks for valid HTML to link type edit tests
  Fix double closing button tag
  Escape the content of option tags
  MBS-7771: Escape the content of textarea tags