This type of situation occurs for 2 reasons.
- The OP didn't think about obscuring it on an otherwise valid attempt to ask a question
- The OP is a spammer in disguise and is hiding spam links within the "code" of their question.
Usually it is going to be pretty obvious what the user is doing. Someone who has somewhat of a history on the site (multiple question, answers, or edits) and has not performed this type of action before is not likely going to be a spammer. There is of course a small chance that this could happen, but it is unlikely someone who go through the effort to creating an account and building of some sort of history just to post 1 spam link is really not likely. They would have a history of doing so.
Whereas a brand new account, asking a hastily written question is more likely to be a spammer, although still could be an innocent mistake.
The reason I spelled this out is Spam/Offensive flags carry a very heavy penalty for the user. You must use them only when appropriate. It would be unfair to punish someone for posting spam or an offensive link when it was a simple mistake. If it is clearly an attempt at spamming the site, then flag away, but if not, then editing is probably the correct course of action. Once the link is edited out, you can flag the post using a custom flag and explain the situation in brief detail.
This is for 2 reasons
- First, the moderator will be able to see more of the user's history than you can. Maybe they do have a habit of doing this and the moderator can take appropriate action.
- Second, if the links are especially bad, the moderator can ask a developer to remove the original revision so it is not present in the revision history of the question.