I get an Syntax error of “Can’t make quoted form of item 1 into type Unicode text.”
on run {input, parameters}
-- encode the selected text
set selText to do shell script "/usr/bin/perl -Mencoding=utf8 -MURI::Escape=uri_escape_utf8 -lne 'print uri_escape_utf8($_)' <<<" & quoted form of (item 1 of input)
open location "https://www.imdb.com/find?s=all&q=" & selText
end run
It might help if you tell us what the previous actions are in the workflow. If we can get an idea of the output from the immediately preceding action, it might reveal the exact nature of the input here.
By the way, the visible [url] and [/url] tags in the ‘open location’ line are probably an artefact introduced by MacScripter’s own display software. Apologies for this.