Read the following dialogue.Mark: Did you hear what happened...
Mark: Did you hear what happened to Tom?
Lisa: No, what’s going on?
Mark: Well, he tried to sabotage Sarah’s project to make her look bad, but the boss found out he was
the one behind it. Now he’s the one in trouble.
Lisa: Wow, that’s crazy! I guess he got hoist with his own petard.
What is the meaning of the idiomatic expression “to be hoist with one's own petard”?