question: public static String quoteHash ( final String str ) { if ( str != null ) { final int idx = str . indexOf ( '#' ) ; if ( ( idx != - 1 ) && ( str . indexOf ( ' ' , idx ) != - 1 ) && ( str . charAt ( idx + 1 ) != '\'' ) ) { return str . substring ( 0 , idx ) + "#'" + str . substring ( idx + 1 ) + '\'' ; } } return str ; }
target:  To let the client display compound words like "#battle axe" in blue, we put the whole item name in quotes.