Changeset 4331
- Timestamp:
- 03/05/09 11:04:28 (18 months ago)
- Files:
-
- 1 modified
-
deployed/bos/projects/bos/web/kml-handlers.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
deployed/bos/projects/bos/web/kml-handlers.lisp
r4330 r4331 90 90 (defun replace-all-url-hosts (string new-host) 91 91 "Replaces all hostnames in STRING by NEW-HOST." 92 (ppcre:regex-replace-all #?r"( (?:https?|ftp)://)\w+(?:\.\w+)*(?::\d+)?" string #?r"\1${new-host}"))92 (ppcre:regex-replace-all #?r"(?<!xmlns=[\"'])((?:https?|ftp)://)\w+(?:\.\w+)*(?::\d+)?" string #?r"\1${new-host}")) 93 93 94 94 (defun replace-lang-query-params (string new-lang) … … 268 268 (with-element "latitude" (text "49.89989439494514")) 269 269 (with-element "altitude" (text "0")) 270 (with-element " range" (text "5400715.913126094"))270 (with-element "heading" (text "0")) 271 271 (with-element "tilt" (text "0")) 272 (with-element " heading" (text "0"))))))))))272 (with-element "range" (text "5400715.913126094")))))))))) 273 273 274 274 (defmethod handle-object ((handler kml-root-dynamic-handler) (object sponsor)) … … 354 354 (kml-region (make-rectangle2 (allocation-area-bounding-box2 area)) 355 355 nil)))) 356 357 (defun fix-xmlns () 358 (with-transaction (:update-kml) 359 (dolist (kml-root (class-instances 'kml-root-data)) 360 (with-slots (kml-string) kml-root 361 (setf kml-string (cl-ppcre:regex-replace-all "http://earth.google.com/kml/2.2" 362 kml-string 363 "http://www.opengis.net/kml/2.2"))))))
