Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129675 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 9080C1A00BD for ; Tue, 23 Dec 2025 10:07:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1766484473; bh=el9eOS2aXPmJyfXDOJ7mkzTfOP1IZLt5dvZV8WtnJFc=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Ge684uUM+YLfao4t89Ds/dKx6sqKfjEX+wSus2iZVEh0/M+DkJk5uvq7kGfJw3nKp oVsLr/Mttu49zkBc20FI+sXBiALvKPi8lDnUUwsL4FDYqaeWlc2IckNEqmxMUUSAoM 8/RQXbftcPDSziGKOCAwlCEqoRXIO2u2O4C5kTUnMQFpdhgScalL9uPITOGEmXLxfn /MgdydmrB03YXl+0V/Pd3SC7TpVCkvIpt0yxLQupPsZm2FmfXt7iTiOQp2bZQ0TA9N vW/szRw9DLq20Pwl504TsiiH86GMTEAiwPtpCauidcdFfKj0CHgVnQc1+SjNVKz9of QyC1l4AuPzuUw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 848481804B3 for ; Tue, 23 Dec 2025 10:07:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-108-mta152.mxroute.com (mail-108-mta152.mxroute.com [136.175.108.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 23 Dec 2025 10:07:47 +0000 (UTC) Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta152.mxroute.com (ZoneMTA) with ESMTPSA id 19b4aadc4400004eea.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 23 Dec 2025 10:07:40 +0000 X-Zone-Loop: 9421bc357a880c594321691d3b4a6dedb94d0ab9483f X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sandfox.me; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:To: Subject:MIME-Version:Date:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=I3WxGeIP2RH3STUzhw7iFXPpJZA6k7obTLlTs3JnYiw=; b=wZ34NSjwN0C/aUAYAgGog6ChIo YQC/Ghd+Bx+Od7ymfb7eCBvIMGupNFnNe+yiwvOv4gmiV4Ldngk5adgMGj9QrJuKYXV/7ugexPHBS JCdBh8ppkrp0anFJAj1xkUWEbH1eoyeYatIA5fUf2zFMhLycaL2VEAajHzlpI5FymL0TeuIpGqfEs sOPVJrqHJ4OaBxmMf9Y/wD+2bBF10FOZtMiJAo26NDwuKV7AgXYDBHhTPDTEL7IigF17uGS1pvcn8 dnMuZqXI63NlnyKnc1L7dCo/1R/BQwvNRv3cBcS+m2Q2Ff5gNkVHQKdUMQ3HkS2wYocCoSf2uUxo0 //wmyoHA==; Message-ID: Date: Tue, 23 Dec 2025 12:07:37 +0200 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC Idea] Short echo tag with automatic HTML escaping () To: internals@lists.php.net References: <7c592a80-76a5-4b16-9c7b-a354aa34802a@mail.ru> Content-Language: en-US In-Reply-To: <7c592a80-76a5-4b16-9c7b-a354aa34802a@mail.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Authenticated-Id: sandfox@sandfox.me From: sandfox@sandfox.me (Anton Smirnov) Hi! On 23/12/2025 11:06, Sergei Issaev wrote: > which compiles to: > > ``` > ENT_HTML5, 'UTF-8'); ?> > ``` htmlspecialchars is configurable for a reason and your flags are arbitrarily different from the function default > - Syntax is currently a parse error → no BC break. It's not, you forgot about short_open_tag=1, in which case it's interpreted as I basically see no value over // included earlier function h($s) { return htmlspecialchars($s, ENT_QUOTES | ENT_HTML5, 'UTF-8'); } // template It's short, it does what you want, it's available today -- Anton