Introduces escaping in Horizon/Orchestration

1) Escape help_text a second time to avoid bootstrap tooltip XSS issue

The "Description" parameter in a Heat template is used to populate
a help_text tooltip in the dynamically generated Heat form. Bootstrap
inserts this tooltip into the DOM using .html() which undoes any
escaping we do in Django (it should be using .text()).

This was fixed by forcing the help_text content to be escaped a second
time. The issue itself is mitigated in bootstrap.js release 2.0.3
(ours is currently 2.0.1).

2) Properly escape untrusted Heat template 'outputs'

The 'outputs' parameter in a Heat template was included in a Django
template with HTML autoescaping turned off. Malicious HTML content
could be included in a Heat template and would be rendered by Horizon
when details about a created stack were displayed.

This was fixed by not disabling autoescaping and explicitly escaping
untrusted values in any strings that are later marked "safe" to render
without further escaping.

Conflicts:
	openstack_dashboard/dashboards/project/stacks/mappings.py

Change-Id: Icd9f9d9ca77068b12227d77469773a325c840001
Closes-Bug: #1289033
Co-Authored-By: Kieran Spear <kispear@gmail.com>
Do not release FIP on disassociate action

In Instances panel, associate and disassociate
Floating IPs now will be consistent.

Fixes bug #1247245

Change-Id: I6a84c43b8bc69fa08c63abff5343144cc4000c37
(cherry picked from commit 348ffe41c49a9a23c9c7da65cbceaf363b13a95e)
Get instance networking information from Neutron

project/instances, admin/instances and the instance details page
all get networking information from Nova. However, with Neutron
enabled, floating IP associations are done direcly with Neutron,
meaning that Nova's DB will fall out of sync and thus the GUI
won't reflect successful floating IP associations until Nova
polls Neutron again and updates its DB. The polling can take
up to several minutes to complete for consecutive floating IP
operations.

The solution is to update instances' networking information from
Neutron immediately after the call to list Nova instances.

Conflicts:
	openstack_dashboard/dashboards/project/instances/tests.py
	openstack_dashboard/dashboards/project/instances/views.py

Closes-Bug: #1265032
Change-Id: I0382fa9a4a9fff21e7b4d05cd3b76783f826735f
(cherry picked from commit 715d6b822838009530b7792cd7749164ae3fc663)
Bug fix on neutron's API to return the correct target ID

In the class FloatingIpManager, the function filters the
resulting list of ports with all available floating ips.
The function now returns the target ID of a port with a
floating IP associated to it. Added a new function to get
this to pass. In the next phase is to refactor the
floating ip api to allow a finer granularity. This will
be useful later for managing floating ips.

Conflicts:
	openstack_dashboard/dashboards/project/instances/tables.py

Change-Id: I02286dbbb60318b0157992622ffdeeae45a71bc1
Closes-Bug: 1265872
(cherry picked from commit 86f87944900e6e713d2baaacec18f55cbe81d878)
Bump stable/havana next version to 2013.2.4

Change-Id: I396562a89b4f21d486e2ab83b829047f8c3609f5
Merge "Get instance networking information from Neutron" into stable/havana
Fix display of images in Rebuild Instance

The image list in Rebuild Instance is constructed from (id, name)
pairs. As the name is a string, the transform function is never called
unless image name is None. In that case it crashes the view.

This change:
  - Builds the image list with (id, image) so the correct thing
      is passed to the transform
  - Corrects the size/name attributes
  - Handles None display name (displays id instead)
  - Set the name of one of the public images in glance_data.py to
      None so errors like these are picked up in the future.

Change-Id: I0d1f8594cccc404c0dd6f254b70d23789817dd06
Closes-bug: #1258349
(cherry picked from commit c720b4f90e59ad76ef846c8ba5b6b6d91883ee66)
Merge "Bug fix on neutron's API to return the correct target ID" into stable/havana
Merge remote-tracking branch 'upstream/stable/havana' into havana