We have moved to Github. Please open tickets there.

Opened 4 years ago

Closed 3 years ago

#1184 closed Defect (fixed)

Improper formatting of ampersands for XHTML 1.0 Transitional

Reported by: cash Owned by:
Priority: normal Milestone: Elgg 1.8.0
Component: Core Version: 1.6RC1
Severity: minor Keywords: validation
Cc: brettp, Difficulty:

Description

Elgg uses '&' in urls instead of '&' which is required for XHTML 1.0 Transitional. See http://www.w3.org/TR/xhtml1/#C_12

Two options:

  • go through code and change all instances of & to &
  • provide function for formatting urls and then retrofit code to use function

Possible function:

    function format_url($url) {
        return preg_replace('/&(?!amp;)/','&',$url);
    }

Change History (4)

comment:1 Changed 3 years ago by brettp

  • Milestone set to Elgg 1.8

comment:2 Changed 3 years ago by dave

  • Type changed from unconfirmed defect to confirmed defect

comment:3 Changed 3 years ago by dave

  • Cc marcus removed

Having had a further look today at the number of times & is used, I think a function like this would be a good addition.

comment:4 Changed 3 years ago by cash

  • Resolution set to fixed
  • Status changed from new to closed

(In [svn:5603]) Fixes #1184 - added elgg_format_url() for handling ampersands in urls

Note: See TracTickets for help on using tickets.