Xhtml: uppercase element names/attributes

This patch finds a bunch of places where uppercase HTML attributes
were used and replaces them with the XHTML lowercase equivalents.

html/Admin/Elements/SelectCustomFieldLookupType | 2 ±
html/Admin/Elements/SelectCustomFieldType | 2 ±
html/Admin/Elements/SelectScrip | 4 +±-
html/Admin/Elements/SelectScripAction | 4 +±-
html/Admin/Elements/SelectScripCondition | 4 +±-
html/Admin/Elements/SelectSingleOrMultiple | 8 +++±—
html/Admin/Elements/SelectStage | 2 ±
html/Admin/Elements/SelectTemplate | 6 ++±–
html/Elements/EditCustomFieldSelect | 6 ++±–
html/Elements/SelectLang | 2 ±
html/Elements/SelectMatch | 16 +++++++±-------
html/Elements/SelectOwner | 4 +±-
html/Elements/SelectSortOrder | 2 ±
html/Elements/SelectStatus | 4 +±-
html/Elements/SelectTicketSortBy | 2 ±
html/Elements/SelectTicketTypes | 2 ±
html/Elements/SelectWatcherType | 2 ±
html/Search/Elements/SelectChartType | 2 ±
html/Search/Elements/SelectGroup | 2 ±
html/Search/Elements/SelectPersonType | 4 +±-
html/Ticket/Elements/ShowDates | 2 ±
html/Ticket/Update.html | 8 +++±—
lib/RT/Interface/Web/QueryBuilder/Tree.pm | 2 ±
23 files changed, 46 insertions(+), 46 deletions(-)

(Patch is attached)

xhtml-uppercase-elements.patch (16.8 KB)

This patch continues with more XHTML cleanups.

html/Admin/Elements/SelectCustomFieldLookupType | 2 ±
html/Admin/Elements/SelectCustomFieldType | 2 ±
html/Elements/SelectBoolean | 2 ±
html/Elements/SelectDateRelation | 2 ±
html/Elements/SelectEqualityOperator | 2 ±
html/Elements/SelectLang | 2 ±
html/Elements/SelectLinkType | 2 ±
html/Elements/SelectMatch | 2 ±
html/Elements/SelectStatus | 2 ±
html/Elements/SelectTimeUnits | 2 ±
html/Elements/SelectWatcherType | 2 ±
html/Search/Elements/SelectPersonType | 2 ±
12 files changed, 12 insertions(+), 12 deletions(-)

(Patch is attached)

xhtml-more-uppercase-elements.patch (5.57 KB)

This patch contains fix for output like this:

Subject:

Validator complains:

reference to non-existent ID “NewReminder-Owner” .

The problem is the attribute needs an “id” attribute so
that the can reference it. This patch adds an “id” attribute.

html/Elements/SelectOwner | 2 ±
html/Ticket/Elements/Reminders | 2 ±
2 files changed, 2 insertions(+), 2 deletions(-)

(Patch is attached)

xhtml-labels-for.patch (999 Bytes)

aplied2008/4/11 Jason Long jlong@messiah.edu:

This patch continues with more XHTML cleanups.

html/Admin/Elements/SelectCustomFieldLookupType | 2 ±
html/Admin/Elements/SelectCustomFieldType | 2 ±
html/Elements/SelectBoolean | 2 ±
html/Elements/SelectDateRelation | 2 ±
html/Elements/SelectEqualityOperator | 2 ±
html/Elements/SelectLang | 2 ±
html/Elements/SelectLinkType | 2 ±
html/Elements/SelectMatch | 2 ±
html/Elements/SelectStatus | 2 ±
html/Elements/SelectTimeUnits | 2 ±
html/Elements/SelectWatcherType | 2 ±
html/Search/Elements/SelectPersonType | 2 ±
12 files changed, 12 insertions(+), 12 deletions(-)

(Patch is attached)


List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Best regards, Ruslan.

applied, thanks.2008/4/11 Jason Long jlong@messiah.edu:

This patch contains fix for output like this:

Subject:

Validator complains:

reference to non-existent ID “NewReminder-Owner” .

The problem is the attribute needs an “id” attribute so
that the can reference it. This patch adds an “id” attribute.

html/Elements/SelectOwner | 2 ±
html/Ticket/Elements/Reminders | 2 ±
2 files changed, 2 insertions(+), 2 deletions(-)

(Patch is attached)


List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Best regards, Ruslan.

I’m going to apply, but please send me patch that returns back space
in “LIKE”<%…
It’s very hard to read such code without spaces. I don’t think there
are any problems with tag or with many spaces between
attributes.2008/4/11 Jason Long jlong@messiah.edu:

This patch finds a bunch of places where uppercase HTML attributes
were used and replaces them with the XHTML lowercase equivalents.

html/Admin/Elements/SelectCustomFieldLookupType | 2 ±
html/Admin/Elements/SelectCustomFieldType | 2 ±
html/Admin/Elements/SelectScrip | 4 +±-
html/Admin/Elements/SelectScripAction | 4 +±-
html/Admin/Elements/SelectScripCondition | 4 +±-
html/Admin/Elements/SelectSingleOrMultiple | 8 +++±—
html/Admin/Elements/SelectStage | 2 ±
html/Admin/Elements/SelectTemplate | 6 ++±–
html/Elements/EditCustomFieldSelect | 6 ++±–
html/Elements/SelectLang | 2 ±
html/Elements/SelectMatch | 16 +++++++±-------
html/Elements/SelectOwner | 4 +±-
html/Elements/SelectSortOrder | 2 ±
html/Elements/SelectStatus | 4 +±-
html/Elements/SelectTicketSortBy | 2 ±
html/Elements/SelectTicketTypes | 2 ±
html/Elements/SelectWatcherType | 2 ±
html/Search/Elements/SelectChartType | 2 ±
html/Search/Elements/SelectGroup | 2 ±
html/Search/Elements/SelectPersonType | 4 +±-
html/Ticket/Elements/ShowDates | 2 ±
html/Ticket/Update.html | 8 +++±—
lib/RT/Interface/Web/QueryBuilder/Tree.pm | 2 ±
23 files changed, 46 insertions(+), 46 deletions(-)

(Patch is attached)


List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Best regards, Ruslan.

done with
find html/ -type f | xargs perl -i -pwe ‘s/(\w")<%/$1 <%/g’

please checkOn Fri, Apr 11, 2008 at 12:51 AM, Ruslan Zakirov ruz@bestpractical.com wrote:

I’m going to apply, but please send me patch that returns back space
in “LIKE”<%…
It’s very hard to read such code without spaces. I don’t think there
are any problems with tag or with many spaces between
attributes.

2008/4/11 Jason Long jlong@messiah.edu:

This patch finds a bunch of places where uppercase HTML attributes
were used and replaces them with the XHTML lowercase equivalents.

html/Admin/Elements/SelectCustomFieldLookupType | 2 ±
html/Admin/Elements/SelectCustomFieldType | 2 ±
html/Admin/Elements/SelectScrip | 4 +±-
html/Admin/Elements/SelectScripAction | 4 +±-
html/Admin/Elements/SelectScripCondition | 4 +±-
html/Admin/Elements/SelectSingleOrMultiple | 8 +++±—
html/Admin/Elements/SelectStage | 2 ±
html/Admin/Elements/SelectTemplate | 6 ++±–
html/Elements/EditCustomFieldSelect | 6 ++±–
html/Elements/SelectLang | 2 ±
html/Elements/SelectMatch | 16 +++++++±-------
html/Elements/SelectOwner | 4 +±-
html/Elements/SelectSortOrder | 2 ±
html/Elements/SelectStatus | 4 +±-
html/Elements/SelectTicketSortBy | 2 ±
html/Elements/SelectTicketTypes | 2 ±
html/Elements/SelectWatcherType | 2 ±
html/Search/Elements/SelectChartType | 2 ±
html/Search/Elements/SelectGroup | 2 ±
html/Search/Elements/SelectPersonType | 4 +±-
html/Ticket/Elements/ShowDates | 2 ±
html/Ticket/Update.html | 8 +++±—
lib/RT/Interface/Web/QueryBuilder/Tree.pm | 2 ±
23 files changed, 46 insertions(+), 46 deletions(-)

(Patch is attached)


List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


Best regards, Ruslan.

Best regards, Ruslan.

Hi RT Developers,

Just got a strange error from CLI (rt). If you use rt cli to grab information from a ticket:

Use of uninitialized value in split at /ib/sw/rt/rt line 873.
Use of uninitialized value in pattern match (m//) at /ib/sw/rt/rt line 877.
rt: Malformed RT response from http://ticket.int.kn.

This is the script we use (is just an alias for easy use of rt cli tool:

$export RTDEBUG=3
jf@pari[3]/home/miejf>
$ce 1041945|more
POST http://ticket.int.kn/REST/1.0/show
Content-Length: 93
Content-Type: multipart/form-data; boundary=xYzZY
Cookie: RT_SID_kuehne-nagel.com.80=90bc9ce33339603be87ae7f07ed6a910

–xYzZY
Content-Disposition: form-data; name=“id”

ticket/1041945/attachments
–xYzZY–

HTTP/1.1 200 OK
Connection: close
Server: Apache/2.0.52 (Red Hat)
Content-Type: text/plain; charset=utf-8
Client-Date: Fri, 11 Apr 2008 08:45:10 GMT
Client-Peer: 10.60.130.154:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked

RT/3.6.5 200 Ok

id: ticket/1041945/attachments

Attachments: 8135251: (multipart/alternative / 0b),
8135252: (text/plain / 412b),
8135253: (text/html / 1.5k),
8135254: (text/plain / 1.1k),
8135255: (text/plain / 730b),
8136349: (text/plain / 374b),
8136411: (text/plain / 384b),
8136588: (text/plain / 372b),
8357858: (text/plain / 1.4k),
8357859: (text/plain / 1.5k)

POST http://ticket.int.kn/REST/1.0/show
Content-Length: 109
Content-Type: multipart/form-data; boundary=xYzZY
Cookie: RT_SID_kuehne-nagel.com.80=90bc9ce33339603be87ae7f07ed6a910

–xYzZY
Content-Disposition: form-data; name=“id”

ticket/1041945/attachments/8135251/content
–xYzZY–

HTTP/1.1 200 OK
Connection: close
Server: Apache/2.0.52 (Red Hat)
Content-Type: multipart/alternative
Client-Date: Fri, 11 Apr 2008 08:45:21 GMT
Client-Peer: 10.60.130.155:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked

Use of uninitialized value in split at /ib/sw/rt/rt line 873.
Use of uninitialized value in pattern match (m//) at /ib/sw/rt/rt line 877.
rt: Malformed RT response from http://ticket.int.kn.
POST http://ticket.int.kn/REST/1.0/show
Content-Length: 109
Content-Type: multipart/form-data; boundary=xYzZY
Cookie: RT_SID_kuehne-nagel.com.80=90bc9ce33339603be87ae7f07ed6a910

–xYzZY
Content-Disposition: form-data; name=“id”

ticket/1041945/attachments/8135252/content
–xYzZY–

From the code:

# Then we send the request and parse the response.
DEBUG(3, $req->as_string);
my $res = $ua->request($req);
DEBUG(3, $res->as_string);

if ($res->is_success) {
    # The content of the response we get from the RT server consists
    # of an HTTP-like status line followed by optional header lines,
    # a blank line, and arbitrary text.

    my ($head, $text) = split /\n\n/, $res->content, 2;
    my ($status, @headers) = split /\n/, $head;
    $text =~ s/\n*$/\n/ if ($text);

    # "RT/3.0.1 401 Credentials required"
if ($status !~ m#^RT/\d+(?:\S+) (\d+) ([\w\s]+)$#) {
        warn "rt: Malformed RT response from $config{server}.\n";
        warn "(Rerun with RTDEBUG=3 for details.)\n" if $config{debug} < 3;
        exit -1;
    }

Looks like, the splitt of $head is not working.

Any Ideas? Suggestions???

Regards

Torsten

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: Klaus-Michael Kühne

Sorry, forgot to add the correct rt call:

rt show ticket/ticket_id/attachments

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: Klaus-Michael KühneVon: rt-devel-bounces@lists.bestpractical.com [mailto:rt-devel-bounces@lists.bestpractical.com] Im Auftrag von Ham MI-ID, Torsten Brumm
Gesendet: Freitag, 11. April 2008 11:18
An: rt-devel@lists.bestpractical.com
Cc: Ham MI-EI, Jurij Fajnberg
Betreff: [Rt-devel] RT 3.6.6 / CLI Error

Hi RT Developers,

Just got a strange error from CLI (rt). If you use rt cli to grab information from a ticket:

Use of uninitialized value in split at /ib/sw/rt/rt line 873.
Use of uninitialized value in pattern match (m//) at /ib/sw/rt/rt line 877.
rt: Malformed RT response from http://ticket.int.kn.

This is the script we use (is just an alias for easy use of rt cli tool:

$export RTDEBUG=3
jf@pari[3]/home/miejf>
$ce 1041945|more
POST http://ticket.int.kn/REST/1.0/show
Content-Length: 93
Content-Type: multipart/form-data; boundary=xYzZY
Cookie: RT_SID_kuehne-nagel.com.80=90bc9ce33339603be87ae7f07ed6a910

–xYzZY
Content-Disposition: form-data; name=“id”

ticket/1041945/attachments
–xYzZY–

HTTP/1.1 200 OK
Connection: close
Date: Fri, 11 Apr 2008 08:45:31 GMT
Server: Apache/2.0.52 (Red Hat)
Content-Type: text/plain; charset=utf-8
Client-Date: Fri, 11 Apr 2008 08:45:10 GMT
Client-Peer: 10.60.130.154:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked

RT/3.6.5 200 Ok

id: ticket/1041945/attachments

Attachments: 8135251: (multipart/alternative / 0b),
8135252: (text/plain / 412b),
8135253: (text/html / 1.5k),
8135254: (text/plain / 1.1k),
8135255: (text/plain / 730b),
8136349: (text/plain / 374b),
8136411: (text/plain / 384b),
8136588: (text/plain / 372b),
8357858: (text/plain / 1.4k),
8357859: (text/plain / 1.5k)

POST http://ticket.int.kn/REST/1.0/show
Content-Length: 109
Content-Type: multipart/form-data; boundary=xYzZY
Cookie: RT_SID_kuehne-nagel.com.80=90bc9ce33339603be87ae7f07ed6a910

–xYzZY
Content-Disposition: form-data; name=“id”

ticket/1041945/attachments/8135251/content
–xYzZY–

HTTP/1.1 200 OK
Connection: close
Date: Fri, 11 Apr 2008 08:45:30 GMT
Server: Apache/2.0.52 (Red Hat)
Content-Type: multipart/alternative
Client-Date: Fri, 11 Apr 2008 08:45:21 GMT
Client-Peer: 10.60.130.155:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked

Use of uninitialized value in split at /ib/sw/rt/rt line 873.
Use of uninitialized value in pattern match (m//) at /ib/sw/rt/rt line 877.
rt: Malformed RT response from http://ticket.int.kn.
POST http://ticket.int.kn/REST/1.0/show
Content-Length: 109
Content-Type: multipart/form-data; boundary=xYzZY
Cookie: RT_SID_kuehne-nagel.com.80=90bc9ce33339603be87ae7f07ed6a910

–xYzZY
Content-Disposition: form-data; name=“id”

ticket/1041945/attachments/8135252/content
–xYzZY–

From the code:

# Then we send the request and parse the response.
DEBUG(3, $req->as_string);
my $res = $ua->request($req);
DEBUG(3, $res->as_string);

if ($res->is_success) {
    # The content of the response we get from the RT server consists
    # of an HTTP-like status line followed by optional header lines,
    # a blank line, and arbitrary text.

    my ($head, $text) = split /\n\n/, $res->content, 2;
    my ($status, @headers) = split /\n/, $head;
    $text =~ s/\n*$/\n/ if ($text);

    # "RT/3.0.1 401 Credentials required"
if ($status !~ m#^RT/\d+(?:\S+) (\d+) ([\w\s]+)$#) {
        warn "rt: Malformed RT response from $config{server}.\n";
        warn "(Rerun with RTDEBUG=3 for details.)\n" if $config{debug} < 3;
        exit -1;
    }

Looks like, the splitt of $head is not working.

Any Ideas? Suggestions???

Regards

Torsten

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: Klaus-Michael Kühne

List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Looks good.
Jason

“Ruslan Zakirov” ruz@bestpractical.com 4/10/08 4:56 PM >>>
done with
find html/ -type f | xargs perl -i -pwe ‘s/(\w")<%/$1 <%/g’

please checkOn Fri, Apr 11, 2008 at 12:51 AM, Ruslan Zakirov ruz@bestpractical.com wrote:

I’m going to apply, but please send me patch that returns back space
in “LIKE”<%…
It’s very hard to read such code without spaces. I don’t think there
are any problems with tag or with many spaces between
attributes.

2008/4/11 Jason Long jlong@messiah.edu:

This patch finds a bunch of places where uppercase HTML attributes
were used and replaces them with the XHTML lowercase equivalents.

(Patch is attached)