Cannot reproduce URL BBCode with no options, and the URL in the body of the BBCode is not caught by Processor action tag hook

Jake B.

Well-known member
Affected version
2.1.X
When using addTagHook to catch URL tags the following examples are caught and passed properly:

[URL unfurl="true"]http://domain.com/uri[/URL]
[URL="http://domain.com/uri"]http://domain.com/uri[/URL]
[URL="http://domain.com/uri"]Text[/URL]

However, the following is not caught:

[URL]http://domain.com/uri[/URL]

Additionally, any tags which are converted by the AutoLink ProcessorAction do not get passed into a url hook - but I think I can work around this by extending the AutoLink processor action.
 
However, the following is not caught:

[URL]http://domain.com/uri[/URL]
I'm unable to reproduce this unfortunately.

If I add ->addTagHook('url', 'analyzeUrlTag') amongst the existing hooks inside AnalyzeUsage and add a new analyzeUrlTag method it seems to get called on every permutation of URL tag, including where no options are provided.

So I don't know if there's some nuance to this that I'm overlooking but it seems ok. Let me know if you have a specific test case you want me to try.
 
I had the same issue and it essentially has not changed. Only in the links the censor now began to apply, and the text itself from this link
http://google.com
1589442748783.webp
But I’m not sure whether it was conceived or not. If in the case the censor is also indicated in this form, then the output is a text without a cesor
 
So I don't know if there's some nuance to this that I'm overlooking but it seems ok. Let me know if you have a specific test case you want me to try.

I ended up going with a different approach, but I'll try to see if I can reproduce it again when I get some time. I did have several links in the same post to test multiple cases, I had all three of the examples in my first post and an additional one that I let the autolink system catch and parse - that one wasn't caught either
 
We're going to close this for now but please let us know if you find a reproduction case.

On the subject of the AutoLink or other processor actions, the hooks operate on the tags defined in the content and we don't attempt to recurse back into the tag hooks when new tags are added programmatically.
 
Back
Top Bottom