function testGetHtmlEscapesValueAttributeValue() { $field = new StringField('company_name'); $field->setValue('H&M'); $html = $field->getHtml(); $this->assertContains('value="H&M"', $html); }
/** * Process the request, get the field value * @return null */ public function processRequest() { parent::processRequest(); if ($this->value && !String::looksLikeUrl($this->value)) { $this->value = 'http://' . $this->value; } }