Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPX output should include full HTML output (encoded) #37

Closed
GoogleCodeExporter opened this issue Apr 27, 2015 · 4 comments
Closed

GPX output should include full HTML output (encoded) #37

GoogleCodeExporter opened this issue Apr 27, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Hi,

this is not actually an bug but a feature proposal, which I already
included in the source code for myself.

Upon using geotoad to save the list of geocaches to a GPX file and
importing this file into both GSAK (Geocaching Swiss Army Knife) and
CacheMate (PPC Version), I noticed the inconvinient behaviour that the
long-description tags get stripped of any HTML codes (as well as new lines,
etc.).

At least with the above mentioned programs, this is not necessary and
reduces readability, as they both support HTML tags inside the description
tags (when properly masked, i.e. '>' ==> '<' etc.)

To fix this, I modified the following files:

* lib/details.rb 
  - line 346: cleanHTML(longdesc) ==> longdesc

* lib/output.rb
  - line 268:

    # fix CGI.escapeHTML stupidity
    if text =~ /\&amp\;([\#\w]+\;)/
      text.gsub!(/\&amp\;([\#\w]+\;)/, "&#{$1}")
      debug "Post-ampersand fix: #{text}"
    end

    ==>

    # fix CGI.escapeHTML stupidity
    #if text =~ /\&amp\;([\#\w]+\;)/
    #  text.gsub!(/\&amp\;([\#\w]+\;)/, "&#{$1}")
    #  debug "Post-ampersand fix: #{text}"
    #end

The last fix is necessary, because   must indeed be substituted with
  otherwise GSAK and other programs will complain about non XML
conformity.

Another thing, which I not explicitly listed here, is the "\r\n"
problematic. The thing is, that in Microsoft OS's, ruby seems to translate
this to two newlines "\n", which is not intended and leads to GPX files
where every second is line empty.

Maybe you find the time to address this,

Cheers, Sethur


Original issue reported on code.google.com by Seth...@gmx.net on 31 Mar 2009 at 9:02

@GoogleCodeExporter
Copy link
Author

Original comment by helixblue on 29 Jun 2009 at 8:23

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

I'm going to hold off on this one until the new template system comes into 
place. The
proposed fix does break some other things at the moment.

Original comment by helixblue on 30 Jun 2009 at 1:27

  • Changed title: GPX output should include full HTML output (encoded)

@GoogleCodeExporter
Copy link
Author

Original comment by helixblue on 1 Jul 2009 at 5:15

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

Fixed in 3.10.

Original comment by helixblue on 24 Jan 2010 at 9:11

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant