Sanitized drag-and-drop names to prevent XSS

This patch is a forward-port of a patch from puppet-coe-service-patch
which had the following commit message:

---

    Revision: e682666e1d928b61e3f87927edd96ffa695ff344
    Author: Daniel Park <daniepar@cisco.com>
    Date: 7/22/2014 12:12:59 PM
    Message:
    DE610 - Sanitized drag-and-drop names to prevent XSS

    https://us1.rallydev.com/#/20103531125d/detail/defect/20692523466

    Chained a few more .replace() calls to properly santize drag-and-drop names for launching Horizon instances and creating firewall names.
    Also added escaping for email addresses. Please refer to the following bugs for more details:

    [OSSA 2014-023] Stored XSS for /admin/users/ (CVE-2014-3475):
    https://bugs.launchpad.net/horizon/+bug/1320235

    [OSSA 2014-023] Persistent XSS in OpenStack Havana UI for Network Name (CVE-2014-3474):
    https://bugs.launchpad.net/horizon/+bug/1322197

    [OSSA 2014-023] XSS in Horizon Heat template - resource name (CVE-2014-3473):
    https://bugs.launchpad.net/horizon/+bug/1308727

    Based on https://review.openstack.org/#/c/105478/

    Change-Id: I03546278f2309615393dbe005c09ecd6629452f5

---

Implements: rally-user-story US4145
Implements: rally-task TA3483
Not-in-upstream: true
Fix multiple Cross-Site Scripting (XSS) vulnerabilities

 * Ensure user emails are properly escaped

User emails in the Users and Groups panel are being passed through the
urlize filter to transform them into clickable links. However, urlize
expects input to be already escaped and safe. We should make sure to
escape the strings first as email addresses are not validated and can
contain any type of string.

Closes-Bug: #1320235

 * Ensure network names are properly escaped in the Launch Instance menu

Closes-Bug: #1322197

 * Escape the URLs generated for the Horizon tables

When generating the Horizon tables, there was an assumption that only
the anchor text needed to be escaped. However some URLs are generated
based on user-provided data and should be escaped as well. Also escape
the link attributes for good measure.

 * Use 'reverse' to generate the Resource URLs in the stacks tables

Closes-Bug: #1308727

Conflicts:
	horizon/tables/base.py
	openstack_dashboard/dashboards/admin/users/tables.py

Change-Id: Ic8a92e69f66c2d265a802f350e30f091181aa42e

Conflicts:
	horizon/static/horizon/js/horizon.instances.js
	horizon/tables/base.py
	openstack_dashboard/dashboards/admin/groups/tables.py
	openstack_dashboard/dashboards/admin/users/tables.py
	openstack_dashboard/dashboards/project/stacks/tabs.py
Sanitized drag-and-drop names to prevent XSS

This patch is a forward-port of a patch from puppet-coe-service-patch
which had the following commit message:

---

    Revision: e682666e1d928b61e3f87927edd96ffa695ff344
    Author: Daniel Park <daniepar@cisco.com>
    Date: 7/22/2014 12:12:59 PM
    Message:
    DE610 - Sanitized drag-and-drop names to prevent XSS

    https://us1.rallydev.com/#/20103531125d/detail/defect/20692523466

    Chained a few more .replace() calls to properly santize drag-and-drop names for launching
    Horizon instances and creating firewall names.
    Also added escaping for email addresses. Please refer to the following bugs for more details:

    [OSSA 2014-023] Stored XSS for /admin/users/ (CVE-2014-3475):
    https://bugs.launchpad.net/horizon/+bug/1320235

    [OSSA 2014-023] Persistent XSS in OpenStack Havana UI for Network Name (CVE-2014-3474):
    https://bugs.launchpad.net/horizon/+bug/1322197

    [OSSA 2014-023] XSS in Horizon Heat template - resource name (CVE-2014-3473):
    https://bugs.launchpad.net/horizon/+bug/1308727

    Based on https://review.openstack.org/#/c/105478/    (commit c844bd)

    Change-Id: I03546278f2309615393dbe005c09ecd6629452f5

---

Implements: rally-user-story US4145
Implements: rally-task TA3483
Not-in-upstream: true
Merge pull request #7 from CiscoSystems/TA3483/e682666e1d

Sanitized drag-and-drop names to prevent XSS