Re: [Django] #10625: Ewkt regexp incorrectly escaped in GeoDjango admin javascript

2012-03-17 Thread Django
#10625: Ewkt regexp incorrectly escaped in GeoDjango admin javascript
-+---
 Reporter:  timlinux |Owner:  springmeyer
 Type:  Bug  |   Status:  closed
Component:  GIS  |  Version:  SVN
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  regexp ewkt  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---
Changes (by claudep):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [17760]:
 {{{
 #!CommitTicketReference repository="" revision="17760"
 Fixed #10625 -- Fixed a Javascript regex in openlayers.js. Thanks timlinux
 for the report and Aymeric Augustin for the patch.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10625: Ewkt regexp incorrectly escaped in GeoDjango admin javascript

2012-03-03 Thread Django
#10625: Ewkt regexp incorrectly escaped in GeoDjango admin javascript
-+---
 Reporter:  timlinux |Owner:  springmeyer
 Type:  Bug  |   Status:  reopened
Component:  GIS  |  Version:  SVN
 Severity:  Normal   |   Resolution:
 Keywords:  regexp ewkt  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---

Comment (by aaugustin):

 I'm attaching the patch (1 char). I don't have time to test this now.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10625: Ewkt regexp incorrectly escaped in GeoDjango admin javascript

2012-03-03 Thread Django
#10625: Ewkt regexp incorrectly escaped in GeoDjango admin javascript
-+---
 Reporter:  timlinux |Owner:  springmeyer
 Type:  Bug  |   Status:  reopened
Component:  GIS  |  Version:  SVN
 Severity:  Normal   |   Resolution:
 Keywords:  regexp ewkt  | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+---
Changes (by aaugustin):

 * ui_ux:  1 => 0
 * stage:  Unreviewed => Accepted


Comment:

 From code inspection, I'm convinced that the bug report is correct. All
 other !JavaScript regexps use double backslashes.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10625: Ewkt regexp incorrectly escaped in GeoDjango admin javascript (was: Ewkt regexp incorrectly escaped)

2012-02-23 Thread Django
#10625: Ewkt regexp incorrectly escaped in GeoDjango admin javascript
-+---
 Reporter:  timlinux |Owner:  springmeyer
 Type:  Bug  |   Status:  reopened
Component:  GIS  |  Version:  SVN
 Severity:  Normal   |   Resolution:
 Keywords:  regexp ewkt  | Triage Stage:  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  1
-+---
Changes (by chris.chamberlin@…):

 * status:  closed => reopened
 * severity:   => Normal
 * cc: chris.chamberlin@… (added)
 * type:   => Bug
 * easy:   => 0
 * ui_ux:   => 1
 * resolution:  worksforme =>


Comment:

 I'm seeing this bug in Chrome 17.0.963.56; it's fairly simple to verify
 that the regexp does not match as designed, using a Javascript console:
 {{{
 > var brokenre = new RegExp("^SRID=\d+;(.+)", "i");
 undefined
 > brokenre.exec('SRID=4326;POINT(1 1)')
 null
 > var fixedre = new RegExp("^SRID=\\d+;(.+)", "i");
 undefined
 > fixedre.exec('SRID=4326;POINT(1 1)')
 ["SRID=4326;POINT(1 1)", "POINT(1 1)"]
 }}}


 It does not usually appear because the read_wkt() function is generally
 only called on startup, when the WKT textarea does not contain the EWKT
 format (with the SRID=4326; string that we're trying to strip).

 It does appear, however, if read_wkt() is called again later; I wanted to
 be able to edit geometries by using either the map or the WKT textbox, so
 I added a JQuery change handler in an template as follows, mostly using
 code adapted from the openlayers.js file. In my GeoModelAdmin, I set
 map_template = "/path/to/my/template" and display_wkt=True.

 {{{
 {% extends "gis/admin/openlayers.html" %}

 {% block init_function %}
 {{ block.super }}
 (function($) {
 $('.vWKTField').height('3em').change(function(e) {
 var wkt = e.target.value
 if (wkt){
 // After reading into geometry, immediately write back to
 // WKT  as EWKT (so that SRID is included).
 var admin_geom = {{ module }}.read_wkt(wkt);
 {{ module }}.deleteFeatures();
 {{ module }}.write_wkt(admin_geom);
 if ({{ module }}.is_collection){
 // If geometry collection, add each component individually
 so they may be
 // edited individually.
 for (var i = 0; i < {{ module }}.num_geom; i++){
 {{ module }}.layers.vector.addFeatures([new
 OpenLayers.Feature.Vector(admin_geom.geometry.components[i].clone())]);
 }
 } else {
 {{ module }}.layers.vector.addFeatures([admin_geom]);
 }
 // Zooming to the bounds.
 {{ module
 }}.map.zoomToExtent(admin_geom.geometry.getBounds());
 if ({{ module }}.is_point){
 {{ module }}.map.zoomTo({{ point_zoom }});
 }
 }
 });
 })(django.jQuery);
 {% endblock init_function %}
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10625: Ewkt regexp incorrectly escaped

2009-05-08 Thread Django
#10625: Ewkt regexp incorrectly escaped
-+--
  Reporter:  timlinux| Owner:  springmeyer
Status:  closed  | Milestone:  1.1
 Component:  GIS |   Version:  SVN
Resolution:  worksforme  |  Keywords:  regexp ewkt
 Stage:  Unreviewed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by Alex):

  * status:  new => closed
  * resolution:  => worksforme

Comment:

 Paul tried half a dozen browsers and we have no new information from the
 reported, marking as worksforme.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10625: Ewkt regexp incorrectly escaped

2009-05-08 Thread Django
#10625: Ewkt regexp incorrectly escaped
-+--
  Reporter:  timlinux| Owner:  springmeyer
Status:  new | Milestone:  1.1
 Component:  GIS |   Version:  SVN
Resolution:  |  Keywords:  regexp ewkt
 Stage:  Unreviewed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by psmith):

 I wasn't able to reproduce this. I tried:

  * Linux:
* FF 3.0.9
* Opera 9.6
  * Win XP:
* FF 3.0.10
* Opera 9.64
* IE 6.0.x

 Suggest this be punted to 1.2 since we don't have a user-agent yet of the
 reported bug.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10625: Ewkt regexp incorrectly escaped

2009-04-02 Thread Django
#10625: Ewkt regexp incorrectly escaped
-+--
  Reporter:  timlinux| Owner:  springmeyer
Status:  new | Milestone:  1.1
 Component:  GIS |   Version:  SVN
Resolution:  |  Keywords:  regexp ewkt
 Stage:  Unreviewed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by jbronn):

 What browser version, please?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10625: Ewkt regexp incorrectly escaped

2009-03-28 Thread Django
#10625: Ewkt regexp incorrectly escaped
-+--
  Reporter:  timlinux| Owner:  springmeyer
Status:  new | Milestone:  1.1
 Component:  GIS |   Version:  SVN
Resolution:  |  Keywords:  regexp ewkt
 Stage:  Unreviewed  | Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by Alex):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * needs_tests:  => 0
  * milestone:  1.1 beta => 1.1

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



[Django] #10625: Ewkt regexp incorrectly escaped

2009-03-25 Thread Django
#10625: Ewkt regexp incorrectly escaped
-+--
 Reporter:  timlinux |   Owner:  springmeyer
   Status:  new  |   Milestone:  1.1 beta   
Component:  GIS  | Version:  SVN
 Keywords:  regexp ewkt  |   Stage:  Unreviewed 
Has_patch:  1|  
-+--
 Hi

 in
 
http://code.djangoproject.com/browser/django/trunk/django/contrib/gis/templates/gis/admin/openlayers.js
 the regexp on line 3 is incorrectly escaped, causing conversion from ewkt
 to wkt to fail for me. I fixed it by changing:

 {{{
 new RegExp("^SRID=\d+;(.+)", "i");
 }}}

 to

 {{{
 new RegExp("^SRID=\\d+;(.+)", "i");
 }}}

 After which it correctly works for me. Would be great if you can apply
 this fix.

 Thanks

 Tim

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---