Page MenuHomePhabricator

Provide a mechansim for safe, translated remarkup
Open, LowPublic

Description

Increasingly, we're doing stuff like:

$form->addRemarkupInstructions(
  pht(
    '... %s ...',
    $user_param));

This is generally sweet, but produces the wrong behavior for some range of user parameters, since they might contain things which remarkup reacts to, like `, **, etc. This isn't unsafe, but could be silly.

A partial solution here is to introduce some inline version of the %%% literal block, but then we need to escape the strings, which is tricky while retaining pht().