@ -518,6 +518,8 @@ public class Blacklist_p {
if ( newEntry . startsWith ( "http://" ) ) {
newEntry = newEntry . substring ( 7 ) ;
} else if ( newEntry . startsWith ( "https://" ) ) {
newEntry = newEntry . substring ( 8 ) ;
}
int pos = newEntry . indexOf ( "/" ) ;
@ -527,6 +529,8 @@ public class Blacklist_p {
newEntry = newEntry + "/.*" ;
}
if ( supportedBlacklistTypes . length > 0 & &
! plasmaSwitchboard . urlBlacklist . contains ( supportedBlacklistTypes [ 0 ] , newEntry . substring ( 0 , pos ) , newEntry . substring ( pos + 1 ) ) ) {
// append the line to the file
PrintWriter pw = null ;
try {
@ -536,7 +540,14 @@ public class Blacklist_p {
} catch ( final IOException e ) {
e . printStackTrace ( ) ;
} finally {
if ( pw ! = null ) try { pw . close ( ) ; } catch ( final Exception e ) { Log . logWarning ( "Blacklist" , "could not close stream to " + blacklistToUse + "! " + e . getMessage ( ) ) ; }
if ( pw ! = null ) {
try {
pw . close ( ) ;
} catch ( final Exception e ) {
Log . logWarning ( "Blacklist" , "could not close stream to " + blacklistToUse + "! " + e . getMessage ( ) ) ;
}
}
}
// add to blacklist
@ -545,6 +556,7 @@ public class Blacklist_p {
plasmaSwitchboard . urlBlacklist . add ( supportedBlacklistTypes [ blTypes ] , newEntry . substring ( 0 , pos ) , newEntry . substring ( pos + 1 ) ) ;
}
}
}
return null ;
}