Project

General

Profile

Feature #2681 » handbook_144_413202c17213.patch

Laurent Opprecht, 23/02/2011 10:49

View differences:

php/blocks/type/display.class.php
102 102
        $handbook = $this->get_object();
103 103
        $display = ContentObjectDisplay :: factory($child);
104 104
        if ($child instanceof Glossary || $child instanceof HandbookTopic) {
105
            $preview_url = $this->get_simple_view_url($child);
105
            $preview_url = htmlentities($this->get_simple_view_url($child));
106 106
            $onclick = '" onclick="javascript:openPopup(\'' . $preview_url . '\'); return false;';
107 107
            $toolbar_item = new ToolbarItem(' ' . $child->get_title(),
108 108
                            Theme :: get_content_object_image_path($child->get_type_name()),
109 109
                            $preview_url, ToolbarItem::DISPLAY_ICON_AND_LABEL, false, $onclick, '_blank');
110 110
            $DESCRIPTION = $toolbar_item->as_html();
111 111
        } else if ($child instanceof Link) {
112
            $preview_url = $child->get_url();
112
            $preview_url = htmlentities($child->get_url());
113 113
            $toolbar_item = new ToolbarItem(' ' . $child->get_title(),
114 114
                            Theme :: get_content_object_image_path($child->get_type_name()),
115 115
                            $preview_url, ToolbarItem::DISPLAY_ICON_AND_LABEL, false, '', '_blank');
116 116
            $DESCRIPTION = $toolbar_item->as_html();
117 117
        } else if ($child instanceof Document) {
118
            $preview_url = RepositoryManager :: get_document_downloader_url($child->get_id());
118
            $preview_url = htmlentities(RepositoryManager :: get_document_downloader_url($child->get_id()));
119 119
            $toolbar_item = new ToolbarItem(' ' . $child->get_title(),
120 120
                            Theme :: get_content_object_image_path($child->get_type_name()),
121 121
                            $preview_url, ToolbarItem::DISPLAY_ICON_AND_LABEL, false, '', '');
122 122
            $DESCRIPTION = $toolbar_item->as_html();
123 123
        } else if ($child instanceof Handbook) {
124
            $preview_url = $this->get_view_handbook_url($handbook);
124
            $preview_url = htmlentities($this->get_view_handbook_url($handbook));
125 125
            $toolbar_item = new ToolbarItem(' ' . $child->get_title(),
126 126
                            Theme :: get_content_object_image_path($child->get_type_name()),
127 127
                            $preview_url, ToolbarItem::DISPLAY_ICON_AND_LABEL, false, '', $this->get_link_target());
(2-2/2)