question: protected String translateToHTML ( final String text ) { final StringBuilder sbuf = new StringBuilder ( ) ; final StringCharacterIterator ci = new StringCharacterIterator ( text ) ; char ch = ci . current ( ) ; while ( ch != CharacterIterator . DONE ) { if ( ch == '#' ) { ch = ci . next ( ) ; if ( ch == '#' ) { appendHTML ( sbuf , ch ) ; ch = ci . next ( ) ; } else { final String link = extractLink ( ci ) ; if ( link != null ) { buildLink ( sbuf , link ) ; } ch = ci . current ( ) ; } } else { appendHTML ( sbuf , ch ) ; ch = ci . next ( ) ; } } return sbuf . toString ( ) ; }
target:  Translate a standard Stendhal encoded to HTML encoded.