0
我想修改註冊模塊gallery3。我在窗體中添加了一個新元素(它由Forge生成),但想要將超鏈接添加到相關標籤。不幸的是它被腳本轉義了,即使是一個html :: mark_clean()也沒有幫助。gallery3,在表格標籤中使用html
這裏是我的代碼:
$form = new Forge("register/handler", "", "post", array("id" => "g-register-form"));
$group = $form->group("register_user")->label(t("Register user"));
$group->checkbox("accept_terms")->label(html::mark_clean(t(html::mark_clean('I confirm to have read the <a href="%url">terms of usage</a>.'),
array("url" => html::mark_clean("http://www.google.de")))))
->id("g-accept-terms")
->rules("required")
->error_messages("accept", t("You have to accept the terms of usage before you may register."));
正如你可能會看到我已經添加了mark_clean在測試用的不同的位置。
結果如下:
<label>
<input type="checkbox" class="checkbox" value="1" name="accept_terms" id="g-accept-terms">
I confirm to have read the <a href="http://www.google.de">terms of usage</a>.
</label>
我想,以避免改變任何現有的核心文件。 感謝您的幫助!
對不起,但這是肯定不是我的問題的答案。正如我在第一篇文章中寫的,所有的html都被系統轉義。 – LordOfBerlin