File: tests/data/url-options.json

Recommend this page to a friend!
  Classes of Nahid Bin Azhar  >  PHP Link to HTML  >  tests/data/url-options.json  >  Download  
File: tests/data/url-options.json
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Link to HTML
Convert URLs and email addresses into HTML links
Author: By
Last change:
Date: 1 year ago
Size: 899 bytes
 

Contents

Class file image Download
{
    "options": {
        "attr": {
            "class": "foo"
        }
    },
    "tests": [
        {
            "test": "www.example.com",
            "expected": "<a href=\"http://www.example.com\" class=\"foo\">www.example.com</a>"
        },
        {
            "test": "www.example.com",
            "options": {
                "attr": {
                    "class": "bar"
                }
            },
            "expected": "<a href=\"http://www.example.com\" class=\"bar\">www.example.com</a>"
        },
        {
            "test": "www.example.com",
            "options": {
                "attr": {
                    "rel": "nofollow"
                },
                "ignore": [
                    "baz"
                ]
            },
            "expected": "<a href=\"http://www.example.com\" class=\"foo\" rel=\"nofollow\">www.example.com</a>"
        }
    ]
}

For more information send a message to info at phpclasses dot org.