  In observation of the cosmic microwave background (CMB) polarization,
"$EB$~leakage" refers to the artificial $B$-mode signal coming from the leakage
of $E$-mode signal when part of the sky is unavailable or excluded. Correction
of such leakage is one of the preconditions for detecting primordial
gravitational waves via the CMB $B$-mode signal. In this work, we design two
independent methods for correcting the $EB$~leakage directly in the pixel
domain using standard definitions of the $E$- and $B$-modes. The two methods
give consistent results, and both are fast and easy to implement. Tests on a
CMB simulation containing zero initial $B$-mode show an efficient suppression
of the $EB$ leakage. When combined with the MASTER method to reconstruct the
full-sky $B$-mode spectrum in simulations with a relatively simple mask, the
error from EB-leakage is suppressed further by more than one order of magnitude
at the recombination bump, and up to three orders of magnitude at higher
multipoles, compared to a "pure" MASTER scheme under the same conditions.
Meanwhile, although the final power spectrum estimation benefits from
apodization, the pixel domain correction itself is done without apodization,
and thus the methods offer more freedom in choosing an apodization based on
specific requirements.
