File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import Property
2828import Reaction
2929import Text.InterpolatedString.QM
3030import Transport
31+ import qualified Network.URI.Encode as URI
3132
3233data CustomCommand = CustomCommand
3334 { customCommandName :: T. Text
@@ -174,6 +175,8 @@ evalExpr :: M.Map T.Text T.Text -> Expr -> T.Text
174175evalExpr _ (TextExpr t) = t
175176evalExpr vars (FunCallExpr " or" args) =
176177 fromMaybe " " $ listToMaybe $ dropWhile T. null $ map (evalExpr vars) args
178+ evalExpr vars (FunCallExpr " urlencode" args) =
179+ T. concat $ map (T. pack . URI. encode . T. unpack . evalExpr vars) args
177180evalExpr vars (FunCallExpr funame _) = fromMaybe " " $ M. lookup funame vars
178181
179182expandVars :: M. Map T. Text T. Text -> [Expr ] -> T. Text
You can’t perform that action at this time.
0 commit comments