Index: kurl.cpp =================================================================== RCS file: /home/kde/kdelibs/kdecore/kurl.cpp,v retrieving revision 1.164 diff -u -3 -p -r1.164 kurl.cpp --- kurl.cpp 2001/03/06 01:17:48 1.164 +++ kurl.cpp 2001/03/12 23:00:40 @@ -1107,7 +1107,15 @@ QString KURL::prettyURL( int _trailing ) // Don't show password! u += "@"; } - u += lazy_encode(m_strHost); + // Check that host has ':', which means IPv6 (not hostname) + if (m_strHost.find(':') != -1) + { + u += '['; + u += lazy_encode(m_strHost); + u += ']'; + } + else + u += lazy_encode(m_strHost); if ( m_iPort != 0 ) { QString buffer; buffer.sprintf( ":%u", m_iPort );