anchor.diff:                      continue;
                   }
               }
  -			int eqsign = propertyfile.indexOf("=",idx);
  +            int eqsign = propertyfile.indexOf("=",idx);
   			
  -			if( eqsign != -1 )
  -			{
  -				int ret = propertyfile.indexOf("\n",eqsign);
  +            if( eqsign != -1 )
  +            {
  +                int ret = propertyfile.indexOf("\n",eqsign);
   				
  -				if( ret == -1 ) ret = propertyfile.length();
  +                if( ret == -1 ) ret = propertyfile.length();
   				
  -				propertyfile = TextUtil.replaceString( propertyfile, eqsign+1, ret, value );
  +                propertyfile = TextUtil.replaceString( propertyfile, eqsign+1, ret, value );
                   
                   return propertyfile;
  -			}
  +            }
               // idx += key.length();
  -		}
  +        }
   
           //
           //  If it was not found, we'll add it here.
  
positive.code:         return f;
      }
      
  	public String readProperties( ServletContext context )
  		throws IOException
  	{
          File f = findPropertyFile( context );
  		FileReader in = null;
  		String contents = null;
  		try
  		{
  			in = new FileReader( f );
              contents = FileUtil.readContents( in );
  		}
  		finally
  		{
  			if( in != null ) in.close();
  		}
  		
  		return contents;
  	}
  %>
  
  <%
      String propertyString = readProperties( getServletContext() );
      
      Properties props = new Properties();
      props.load( new ByteArrayInputStream(propertyString.getBytes("ISO-8859-1")) );
      
  
      String appname = request.getParameter( "appname" );
      String baseurl = request.getParameter( "baseurl" );
      String dir = request.getParameter( "dir" );
      String logdir = request.getParameter( "logdir" );
      String workdir = request.getParameter( "workdir" );
      String password1 = request.getParameter( "password1" );
      String password2 = request.getParameter( "password2" );
      String password  = request.getParameter( "password" );
  
      String oldpassword = props.getProperty( "jspwiki.auth.masterPassword", null );
      
  
negative.code:         return s.trim();
      }
      
      public String setProperty( String propertyfile, String key, String value )
      {
          int idx = 0;
          
          value = TextUtil.native2Ascii( value );
          
          while( (idx < propertyfile.length()) && ((idx = propertyfile.indexOf(key,idx)) != -1) )
          {
              int prevret = propertyfile.lastIndexOf("\n",idx);
              if( prevret != -1 )
              {
  