In the editor, under the Equipment -> Weapon, Magic tab, click "New (Copy)" and select the Holy Avenger.
Give this new version whatever name and unique ID you want. Under the Eval Scripts button, replace
Code:
gizmo.child[gCustMagic].field[gItemExpr].text = #magicgearexpr[] & " & (wGroup.Sword)"
with
Code:
gizmo.child[gCustMagic].field[gItemExpr].text = #magicgearexpr[] & " & (wCategory.Melee & wProfReq.Martial)"
Save and Test Now! and you're good to go.
EDIT: Also, just for the sake of it looking right, you'll wanna change the Base Item Restrictions field to say something like "Any martial melee weapon". This is purely text, not a matter of function.