yii2 icon indicating copy to clipboard operation
yii2 copied to clipboard

add attribute on generated <script> tag

Open shinedira opened this issue 1 year ago • 3 comments

What steps will reproduce the problem?

<?php $form = ActiveForm::begin(['id' => 'login-form']); ?>

    <?= $form->field($model, 'date_posted')->widget(DatePicker::classname()) ?>

    <div class="form-group">
        <?= Html::submitButton('Save') ?>
    </div>

<?php ActiveForm::end(); ?>

and it generated

What is the expected result?

but what I want is to add an attribute on the generated

Additional info

Q A
Yii version 2.0.37
PHP version 7.3.20
Operating system Windows 11

shinedira avatar Dec 22 '23 01:12 shinedira

What's your use-case?

samdark avatar Dec 22 '23 06:12 samdark

need an attribute to tag script for content security policy (csp) <script nonce="key">

What's your use-case?

shinedira avatar Dec 22 '23 07:12 shinedira

I have the same problem while integrating CSP. I am working on a pull request to address this.

skepticspriggan avatar Jan 24 '24 12:01 skepticspriggan