Na$_2$S and NaCN, if present in the extract, will be
decomposed to H$_2$S and HCN by HNO$_3$ .
NaCN + HN$O_3$ $\rightarrow$ NaN$O_3$ + HCN
Na$_2$S + 2HNO$_3$ $\rightarrow$ 2NaN$O_3$ + H$_2$S
These will escape from the solution and will not
interfere with the test for halogens.