Loading ...
Sorry, an error occurred while loading the content.

bug fix - clickmaps - url encoding - certain punct chars dropped

Expand Messages
  • Stephen C. Grubb
    Hi, The following bug affects applications where clickmaps containing URLs are generated. A code bug in the url encoding routine causes certain puncuation
    Message 1 of 1 , Sep 8, 2006
    • 0 Attachment
      Hi,

      The following bug affects applications where clickmaps containing URLs are
      generated. A code bug in the url encoding routine causes certain
      puncuation characters to be dropped. The characters are: $-_.+!*'(),

      Fix is to edit glroutines.c and change line 1105 as shown below.

      Sorry for any inconvenience this may have caused. This fix will be
      present in the next release. -Steve


      glroutines.c

      1095 /* ================================================= */
      1096 /* URLENCODE - perform url encoding (any questionable characters
      changed to %XX hex equivalent */
      1097 /* added scg 5/29/06 */
      1098 int
      1099 GL_urlencode( in, out )
      1100 char *in, *out;
      1101 {
      1102 int i, j, c;
      1103 for( i = 0, j = 0; in[i] != '\0'; i++ ) {
      1104 c = in[i];
      1105 if( GL_member( c, "$-_.+!*'()," )) out[j++] = in[i];
      1106 else if( c <= 47 || c >= 123 || (c >= 58 && c <= 64 ) || (
      c >= 91 && c <= 96 ) ) {
      1107 sprintf( &out[j], "%%%X", c );
      1108 j += 3;
      1109 }
      1110 else out[j++] = in[i];
      1111 }
      1112 out[j] = '\0'; /* terminate */
      1113 return( 0 );
      1114 }



      Stephen C. Grubb scg@... x-6633
      Scientific Software Engineer, The Jackson Laboratory
      600 Main Street Bar Harbor, Maine 04609 USA
    Your message has been successfully submitted and would be delivered to recipients shortly.