Fix XSS Vulnerability In "tpl.inc.php"

Fix applied to where the value is directly output to browser instead of where fetched in case special chars are allowed in `code_name`, which may break logic prior to output.
Apply numeric sort to the ticket number column
Fix XSS Vulnerability In "tpl.inc.php"

Another area was also outputting the unsanitized value.
email: Always include a message-id token

Previously, if the quoted response mechanism was disabled, then outgoing
mail would also not include the message-id token. This breaks the
correlation of email to ticket-thread. Now, the message-id token is always
embedded in HTML emails even if the quoted-response removal system is
disabled.

(Turns out that the message-id token was always included in text bodies.)
Make sure ticket create date is used on export
Fix incorrect collaborator and owner email links

Also, fix duplicate emails where a user as a collaborator would be sent a
confirmation for their own respective email.
forms: Fix html rendering of checkbox description
forms: Always attempt to look up selection value by name
forms: Fix crash adding user with selection field
email: Add MAIL_EOL setting to ost-config.php file

This setting allows administrators to add (uncomment) a MAIL_EOL setting in
the ost-config.php config file to define the line ending used for mail
headers and encoded bodies in outbound mail (SMTP, for instance).

By default, CRLF is used by the SMTP email generator as per the RFC 822
standard. However, many administrators can benefit by setting LF (\n) as the
line ending.
email: Improve user identification from headers

Previously, the code would scan the email headers until it found a positive
match from any of the email headers scanned. Additionally, it would attempt
to find the user from the tagged email references header. However, this
algorithm assumed that the references header was constant and predictable in
its ordering. Recent tests with Gmail prove otherwise in some tests.

This patch changes the system so that only the tagged reference header is
included in the References header, and it will scan all items in a header
(namely the References header) until both the thread and a user are
identified. If a user can be identified, the thread and user are returned.
Otherwise, the first thread hit is returned.
pages: Fix incorrect lookup of inline images

In some cases, a POST might be sent to the server and there be no draft. In
such a case, neither the draft nor the body of the page can be inspected for
images. Even worse, in some cases the previous images might be unlinked from
the article without being relinked. Therefore, the images will no longer be
linked to the page and will likely be purged from the system.
forms: Support non-US locale on client portal

The staff portal has a feature where the date fields are converted to
YYYY-MM-DD prior to form submission. However, this code was not ported to
the client portal. Therefore, for non-US date formats (d/m/Y for instance)
would not be processed properly by the server and would be nulled prior to
validation.
bug: Decode mailbox when parsing an email address

This addresses cases where incoming emails doesn't include charset and
mailbox may include non-ascii characters.
orm: Fix MySQL occasional "Commands OOS" error

Under certain intermittent circumstances (usually a significant number of
ORM queries), the ORM will trigger a MySQL error:

Commands out of sync; you can't run this command now

Usually this MySQL error is related to buffered versus unbuffered queries.
However, the ORM already uses buffered queries (MySQL calls it
"store_result"). In this case, it appears there is some sort of race between
fetching the result metadata before configuring the statement for buffering.
(By "race" I mean that the error is not reliably triggered).

This patch seems to fix the issue by configuring buffering before fetching
result metadata — necessary to configure the fetching (output) phase of the
statement.
Add release notes