Project

General

Profile

« Previous | Next » 

Revision 2557

Added by sgarg about 19 years ago

Added fix for http://bugzilla.ecoinformatics.org/show_bug.cgi?id=2172.

normalize method now checks for & in the text passed to the method

View differences:

src/edu/ucsb/nceas/metacat/MetaCatUtil.java
332 332
                                 ch = s.charAt(i);
333 333
                             }
334 334
                             str.append(';');
335
                         }
336
                         else
335
                         } else 
336
                         // check if & is in front of amp; 
337
                         // (we dont yet check for other HTML 4.0 Character entities) 
338
                         if (i + 4 < len -1 && s.charAt(i + 1) == 'a' 
339
                        	 && s.charAt(i + 2) == 'm' 
340
                        		 && s.charAt(i + 3) == 'p' 
341
                        			 && s.charAt(i + 4) == ';'){
337 342
                             str.append("&amp;");
343
                             i += 5;                        	 
344
                         } else
345
                             str.append("&amp;");
338 346
                         /////////
339 347
                         break;
340 348
                     }

Also available in: Unified diff