예제 #1
0
 function testGetHtmlEscapesValueAttributeValue()
 {
     $field = new StringField('company_name');
     $field->setValue('H&M');
     $html = $field->getHtml();
     $this->assertContains('value="H&M"', $html);
 }
예제 #2
0
 /**
  * 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;
     }
 }