<?xml version="1.0" encoding="UTF-8"?>
<post>
  <body>For the merchant navy transport fix, I had to remove the extra [xx,xx] island information from the city name.

I added:

&lt;code&gt;str = str.substring(str.indexOf(']')+1,str.length);&lt;/code&gt;

to Coop's Trim Whitespace Function:

&lt;pre&gt;
/***********************************************************************
* Trim Whitespace Function ************************************************************************/
function Trim(str){ 
	str = str.substring(str.indexOf(']')+1,str.length);
	while(str.charAt(0) == (&quot; &quot;) ){ 
		str = str.substring(1);
	}
	while(str.charAt(str.length-1) == &quot; &quot; ){ 
		str = str.substring(0,str.length-1);
	}
return str;
}
&lt;/pre&gt;</body>
  <body-html>&lt;p&gt;For the merchant navy transport fix, I had to remove the extra [xx,xx] island information from the city name.&lt;/p&gt;

&lt;p&gt;I added:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;str = str.substring(str.indexOf(']')+1,str.length);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;to Coop's Trim Whitespace Function:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;
/***********************************************************************
* Trim Whitespace Function ************************************************************************/
function Trim(str){ 
	str = str.substring(str.indexOf(']')+1,str.length);
	while(str.charAt(0) == (&quot; &quot;) ){ 
		str = str.substring(1);
	}
	while(str.charAt(str.length-1) == &quot; &quot; ){ 
		str = str.substring(0,str.length-1);
	}
return str;
}
&lt;/pre&gt;&lt;/p&gt;</body-html>
  <created-at type="datetime">2008-06-27T19:59:30Z</created-at>
  <forumable-id type="integer">25124</forumable-id>
  <forumable-type>Script</forumable-type>
  <id type="integer">40348</id>
  <topic-id type="integer">13150</topic-id>
  <updated-at type="datetime">2008-11-16T23:47:24Z</updated-at>
  <user-agent nil="true"></user-agent>
  <user-id type="integer">57537</user-id>
</post>
