How to render HTML from variable I want to render as HTML not string on Twig. I have a variable that hold form HTML but after putting on Twig template it's render as string like given below: 

1) Set loginpopup variable in preprocess hook.

function MYTHEMENAME_preprocess_page(&amp;$variables) {
    $variables['loginpopup'] = array(
   '#plain_text' =&gt; "&lt;div style='display:none'&gt;&lt;div id='login-pop'&gt;".drupal_render($form)."&lt;/div&gt;&lt;/div&gt;"
    );  
   } 


2) Render on Twig template file as :

 {{ loginpopup }}   


But it's visible as string (i.e. double-escaped).. What's the problem and how do I fix it?
You should definitely NOT put HTML into render arrays (I'm not saying you cannot (you can with #prefix and #suffix), you just shouldn't - that's D7 thinking). You should define a theme hook/template for that so that you can use your own template. But if you have to use inline template:

$page['noscript'] = [
  '#type' =&gt; 'inline_template',
  '#template' =&gt; '&lt;noscript&gt;&lt;div&gt;{{ message }}&lt;/div&gt;&lt;/noscript&gt;',
  '#context' =&gt; [
    'message' =&gt; $noscript_message,
  ],
];