Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-1836

& in custom site_id breaks some URLs and Announcements

    XMLWordPrintable

    Details

      Description

      We are doing a custom 'push' to populate our course sites and changed the site_id of a course to be a 'friendlier' format instead of the auto-generated unique site id.

      By doing so, we shot ourselves in the foot because some of our courses contain an ampersand '&' in the course title. When trying to join/unjoin one of these courses, for example, would not work because the URL wasn't escaped properly to look for ampersands (and why should they, there shouldn't be an ampersand in there, should there )

      We found that when you tried to display the text of an Announcement the same type of behavior would occur. We had to edit several .vm files to fix this.

      Is this something noteworthy enough to post as a bug fix for other institutions that may be so bold as to incorporate their own site_id convention?

      e.g. Only three .vm files contain an unescaped "=$site.Id" :

      find . -name "*.vm" -exec grep -l '=$site.Id' {} \;

      ./webapp/vm/prefs/chef_membership.vm
      ./webapp/vm/prefs/chef_membership_joinable.vm
      ./webapp/vm/sitesetup/chef_site-sitemanage-list.vm

      Eight other .vm files escape the $site.Id properly:

      grep site.Id ./webapp/vm/admin/chef_sites_list.vm

      #if ($service.allowUpdateSite($site.Id))
      <a href="#toolLink("$action" "doEdit")&id=$validator.escapeUrl($site.Id)">

      $validator.escapeHtml($site.Id)

      $validator.escapeHtml($site.Id)

      Also changed in:
      Also in:
      legacy/tools/src/webapp/vm/announcement/chef_announcement.vm

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                wogahnct Cheryl Johns (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration