create an instance of the abstract class DomSanitizer

in an Angular component we can inject DomSanitizer and use it. @component({..}) export class myComponent{ constructor(private sanitizer: DomSanitizer){ //now we can use this.sanitizer.bypassSecurityTrustHtml(..) } } but how to use DomSanitizer without injecting it in the constructor? //this is not a class, so it doesn’t contain a constructor() export function keepHtml(value: string){ sanitizer = new DomSanitizer();…

Details

Customizing the checkout form

I need to fill Billing Info form with data that the user has filled in another page of my commerce site. I’ve made a hook_form_alter with the following weird code (with the help of kint): function HOOK_form_alter(&$form, $form_state, $form_id) { switch ($form_id) { case ‘commerce_checkout_flow_multistep_default’: $form[“payment_information”][“add_payment_method”][“billing_information”][“address”][“widget”][0][“address”][“#default_value”][“given_name”]=”NAME”; $form[“payment_information”][“add_payment_method”][“billing_information”][“address”][“widget”][0][“address”][“#default_value”][“country_code”]=”IT”; It works with name but it does not…

Details

After upgrade on Ubuntu 19.10 internet connection exclusively works when connected to VPN

It’s a bit odd, but since the upgrade to 19.10 I can only access the internet through browser and email after I connected to my VPN. Before it is not possible. Any pointers? edit: $ ip link;ip route 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00…

Details