Commit 63db3e1c authored by Nathan Haug's avatar Nathan Haug
Browse files

Sync with HEAD

parent f968ffa2
......@@ -158,7 +158,7 @@ function link_field($op, &$node, $field, &$node_field, $teaser, $page) {
// Delete and insert, rather than update, in case a field was added.
switch($field['type']) {
case 'link':
link_field('delete', $node, $field, $node_field, $teaser, $page);
db_query("DELETE FROM {node_field_link_data} WHERE vid = %d AND field_name = '%s'", $node->vid, $field['field_name']);
link_field('insert', $node, $field, $node_field, $teaser, $page);
break;
}
......@@ -420,8 +420,12 @@ function link_validate_link($text) {
')'.
// port number
'(:([0-9]{1,4}))?'.
// the rest of the path
'(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.\/%=&,:]*)?)?'.
// the rest of the path
"(\/[a-z0-9_\-\.~+%=&,$'():;*@]+)*".
// anchors
"#?[a-z0-9_\-\.~+%=&,$'():;*@]*".
// the query string
"(\?[a-z0-9+_\-\.\/%=&,$'():;*@]*)?". //)?". //$-_.+*'()
// forward slash 0 or 1 times
'(\/)?'.
// end of the expression, case insensitive
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment