[Rt-commit] rt branch, 4.0/escape-quotes-in-search-format, repushed
Alex Vandiver
alexmv at bestpractical.com
Thu Oct 31 19:07:14 EDT 2013
The branch 4.0/escape-quotes-in-search-format was deleted and repushed:
was 34ff80b97c9e1b8074a9acde5cbafa84ecda4079
now f8512519102264bdd5a049a8b1523bffeec14824
1: 420b0fe < -: ------- handle quotes in search format
-: ------- > 1: 996420d Return unescaped values from ParseFormat
2: 34ff80b ! 2: f851251 Handle single quotes correctly in format strings
@@ -1,11 +1,15 @@
Author: sunnavy <sunnavy at bestpractical.com>
- BuildFormatString is the more right place to handle escape stuff in EditFormat
+ Handle single quotes correctly in format strings
- previously BuildFormatString use a naive/buggy format parser, e.g. it can't
- handle commas in fields, misparse strings like "__Foo__ or __Bar__" and
- "__CF.{Some Thing Here}__". now it's been replaced by our standard ParseFormat
- component.
+ Previously, BuildFormatString used a naive/buggy format parser, e.g. it
+ can't handle commas in fields, and misparsed strings like "__Foo__ or
+ __Bar__" and "__CF.{Some Thing Here}__". It has now been replaced by
+ our standard ParseFormat component.
+
+ Additionally, ensure that the values returned from ParseFormat are the
+ fully parsed values, which includes performing all unescaping. This
+ simplifies round-tripping.
diff --git a/share/html/Search/Elements/BuildFormatString b/share/html/Search/Elements/BuildFormatString
--- a/share/html/Search/Elements/BuildFormatString
@@ -62,29 +66,3 @@
push( @format_string, $row );
}
-
-diff --git a/share/html/Search/Elements/EditFormat b/share/html/Search/Elements/EditFormat
---- a/share/html/Search/Elements/EditFormat
-+++ b/share/html/Search/Elements/EditFormat
-@@
- <td valign="top"><select size="6" name="SelectDisplayColumns" multiple="multiple">
- % my %seen;
- % foreach my $field ( grep !$seen{lc $_}++, @$AvailableColumns) {
--% my $value = $field;
--% $value =~ s!(['\\])!\\$1!g;
--<option value="<% $value %>"><% loc($field) %></option>
-+<option value="<% $field %>"><% loc($field) %></option>
- % }
- </select></td>
- <td>
-@@
- <select size="4" name="CurrentDisplayColumns">
- % my $i=0;
- % foreach my $field ( @$CurrentFormat ) {
--% my $label = $field->{Column};
--% $label =~ s!\\(.)!$1!g;
--<option value="<% $i++ %>><% $field->{Column} %>"><% loc( $label ) %></option>
-+<option value="<% $i++ %>><% $field->{Column} %>"><% loc( $field->{Column} ) %></option>
- % }
- </select>
- <br />
More information about the Rt-commit
mailing list