you have a few options, sometimes a good quality trade oil based undercoat will stop it but not guaranteed.
you can buy a knotting solution which you apply by cloth to the knot and surrounding area, however the knotting solutions on the market today are not as good as in the past (e u regs) but for skirtings they should work ok but i wouldn't use on doors.
the best i find is what's classed as stain blocker/sealer, i use the shallack based zinnser (it's either bin 123 or bullseye. must be oil based not water,) the beauty of this is you can also use as your primer coat but make sure area is well ventillated, it dries very quickly and gives an excellent base, slightly more costly than other 2 methods but once done you never have to worry about again.
which ever method you choose it must be done prior to priming, and ensure the areas are clean of any dust/grease.
hope of some help nigel.
DIY how to tutorial projects and guides - Did you know we have a DIY Projects section? Well, if no, then we certainly do! Within this area of our site have literally hundreds of how-to guides and tutorials that cover a huge range of home improvement tasks. Each page also comes with pictures and a video to make completing those jobs even easier!