以直报怨,以德报德 yǐzhíbàoyuànyǐdébàodé to repay kindness with kindness and enmity with justice
An idiom from the Analects of Confucius suggesting that one should return good for good, but respond to resentment or injury with uprightness and fairness rather than revenge or excessive kindness.