diff --git a/include/text.php b/include/text.php
index dcc7308723..0f6c83234b 100644
--- a/include/text.php
+++ b/include/text.php
@@ -960,19 +960,18 @@ if(! function_exists('search')) {
* @param string $s search query
* @param string $id html id
* @param string $url search url
- * @param boolean $save show save search button
- * @return string html for search box #FIXME: remove html
+ * @param boolean $savedsearch show save search button
*/
function search($s,$id='search-box',$url='/search',$save = false) {
$a = get_app();
- $o = '
';
- $o .= '
';
- return $o;
+ return replace_macros(get_markup_template('searchbox.tpl'), array(
+ '$s' => $s,
+ '$id' => $id,
+ '$action_url' => $a->get_baseurl((stristr($url,'network')) ? true : false) . $url,
+ '$search_label' => t('Search'),
+ '$save_label' => t('Save'),
+ '$savedsearch' => feature_enabled(local_user(),'savedsearch'),
+ ));
}}
if(! function_exists('valid_email')) {
diff --git a/view/templates/searchbox.tpl b/view/templates/searchbox.tpl
new file mode 100644
index 0000000000..ce656433bf
--- /dev/null
+++ b/view/templates/searchbox.tpl
@@ -0,0 +1,11 @@
+
+
+